Page 1 of 1

Best NXT language for a C++ programmer?

Posted: 18 Feb 2012, 20:56
by miningm
I got my NXT about 2 years ago, and programmed it using nxc for about a year. Then I got a few new toys and played with them instead.

Now, the NXT was my first contact with programming, so I didn’t know anything about any of the different languages. I went on to learn C++ after loving NXC, and now after a year hiatus, I want to program my NXT again. However, now there seem to be so many languages it supports I don’t even know what to choose. I love C++ now, and I barely remember NXC at all.

So, what I would like to know is this: should I stick to NXC, or would I do better trying out one of the c#/c compilers now that I have gotten so used to C++? Particularly, which are easier to interface with the sensors, and which are easier for multitasking?

Thanks.

Re: Best NXT language for a C++ programmer?

Posted: 18 Feb 2012, 21:43
by mattallen37
I personally like NXC, but ROBOTC is also really good.

Re: Best NXT language for a C++ programmer?

Posted: 18 Feb 2012, 21:53
by miningm
But is ROBOTC worth the money when I can just use GCC? Also, I read it evaluates -100 as greater than -90, I hope that isn't true, but is it?

Re: Best NXT language for a C++ programmer?

Posted: 18 Feb 2012, 22:01
by HaWe
you may have real C++ by GNU c++ compiler (e.g, with Eclipse IDE) when you use the nxtOSEK fw.
http://lejos-osek.sourceforge.net/

Re: Best NXT language for a C++ programmer?

Posted: 18 Feb 2012, 22:42
by miningm
doc-helmut wrote:you may have real C++ by GNU c++ compiler (e.g, with Eclipse IDE) when you use the nxtOSEK fw.
http://lejos-osek.sourceforge.net/
Wow, thanks. All I could find was a C environment, not a C++ one, I am going to give this a try.

Re: Best NXT language for a C++ programmer?

Posted: 18 Feb 2012, 23:05
by mattallen37
I have never heard about it computing -100 > -90 == true.

As far as it being worth the money, that's something you can decide during the 30-day free trial.

Like I said though, I prefer to use NXC.

nxtOSEK is perhaps more what you are looking for, but I don't think there is the same level of support available.

Re: Best NXT language for a C++ programmer?

Posted: 19 Feb 2012, 00:24
by nxt-ai
Two things:

One: If you don't want to try nxt-OSEK (Lejos OSEK (or whatever its called)) firmware, you can either ramboot or use the Enhanced NXC Firmware; http://lejos-osek.sourceforge.net/howtoupload.htm

Two: If you happen to decide on RobotC (unless you are in a First FTC league I can't imagine why, but hey, that's my opinion) I would recommend you buy the Perpetual license, its right under the yearly subscription purchasing options and if you're not careful you'll fall for their discounts and find yourself annually paying them. Also they don't tell you that the annual licenses are non-transferrable so if you switch machines you need to buy another license.

Re: Best NXT language for a C++ programmer?

Posted: 19 Feb 2012, 07:51
by miningm
nxt-ai wrote:One: If you don't want to try nxt-OSEK (Lejos OSEK (or whatever its called)) firmware, you can either ramboot or use the Enhanced NXC Firmware; http://lejos-osek.sourceforge.net/howtoupload.htm
I saw that, and I think I will stick to the enhanced firmware unless I need the space. I have been wondering though, does the ramboot method and their BIOS maintain the firmware upload mode, so I can reinstall the enhanced firmware if I need to?
nxt-ai wrote:Two: If you happen to decide on RobotC (unless you are in a First FTC league I can't imagine why, but hey, that's my opinion) I would recommend you buy the Perpetual license, its right under the yearly subscription purchasing options and if you're not careful you'll fall for their discounts and find yourself annually paying them. Also they don't tell you that the annual licenses are non-transferrable so if you switch machines you need to buy another license.
I think I am going to avoid RobotC. At this point, there are so many freely available languages; there really is no point in paying for a C implementation, especially when I can get full C++ instead.

Re: Best NXT language for a C++ programmer?

Posted: 19 Feb 2012, 14:51
by schodet
miningm wrote:
nxt-ai wrote:One: If you don't want to try nxt-OSEK (Lejos OSEK (or whatever its called)) firmware, you can either ramboot or use the Enhanced NXC Firmware; http://lejos-osek.sourceforge.net/howtoupload.htm
I saw that, and I think I will stick to the enhanced firmware unless I need the space. I have been wondering though, does the ramboot method and their BIOS maintain the firmware upload mode, so I can reinstall the enhanced firmware if I need to?
Yes, firmware upload mode is implemented in the microcontroller, you cannot get rid of it.

Re: Best NXT language for a C++ programmer?

Posted: 19 Feb 2012, 21:21
by bullestock
miningm wrote:I got my NXT about 2 years ago, and programmed it using nxc for about a year. Then I got a few new toys and played with them instead.

Now, the NXT was my first contact with programming, so I didn’t know anything about any of the different languages. I went on to learn C++ after loving NXC, and now after a year hiatus, I want to program my NXT again. However, now there seem to be so many languages it supports I don’t even know what to choose. I love C++ now, and I barely remember NXC at all.

So, what I would like to know is this: should I stick to NXC, or would I do better trying out one of the c#/c compilers now that I have gotten so used to C++? Particularly, which are easier to interface with the sensors, and which are easier for multitasking?

Thanks.
Speaking as somebody who has coded in C++ for a living for the past 15 years, I think you should at least consider the Java-based leJOS NXJ. It has good performance and a pretty large user base.