Programming the Lego Colour Sensor in NXC

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
borntoown
Posts: 58
Joined: 14 Nov 2010, 16:58

Re: Programming the Lego Colour Sensor in NXC

Post by borntoown »

mattallen37 wrote:Get the latest version of BCC.
I do have it...
B2O productions are the best for the best.
mattallen37
Posts: 1818
Joined: 02 Oct 2010, 02:19
Location: Michigan USA
Contact:

Re: Programming the Lego Colour Sensor in NXC

Post by mattallen37 »

Do you have the compiler settings set to target the proper firmware?
Matt
http://mattallen37.wordpress.com/

I'm all for gun control... that's why I use both hands when shooting ;)
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Programming the Lego Colour Sensor in NXC

Post by afanofosc »

In particular, to use any features of the 2.0 firmwares (i.e., version 1.27 or greater) such as the color sensor or support for floating point types you have to tell BricxCC to tell the compiler that it should allow code that requires one of the 2.0 firmware versions. As shown in the screenshot below you check the "NXT 2.0 compatible firmware" option in the Preferences dialog on the Compiler|NBC/NXC tab.
options.jpg
options.jpg (39.92 KiB) Viewed 4819 times
John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
borntoown
Posts: 58
Joined: 14 Nov 2010, 16:58

Re: Programming the Lego Colour Sensor in NXC

Post by borntoown »

Thank you.
B2O productions are the best for the best.
Post Reply

Who is online

Users browsing this forum: Semrush [Bot] and 9 guests