Best NXT language for a C++ programmer?

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
miningm
Posts: 4
Joined: 18 Feb 2012, 20:49

Best NXT language for a C++ programmer?

Post 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.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

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

Post by mattallen37 »

I personally like NXC, but ROBOTC is also really good.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
miningm
Posts: 4
Joined: 18 Feb 2012, 20:49

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

Post 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?
HaWe
Posts: 2500
Joined: 04 Nov 2014, 19:00

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

Post 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/
miningm
Posts: 4
Joined: 18 Feb 2012, 20:49

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

Post 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.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

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

Post 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.
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
nxt-ai
Posts: 36
Joined: 10 Jan 2011, 05:02

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

Post 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.
miningm
Posts: 4
Joined: 18 Feb 2012, 20:49

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

Post 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.
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

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

Post 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.
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
bullestock
Posts: 27
Joined: 29 Sep 2010, 19:34
Location: Denmark
Contact:

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

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests