- Not Quite C
-
Not Quite C (NQC) is a programming language, application programming interface (API), and native bytecode compiler toolkit for the Lego Mindstorms, Cybermaster and LEGO Spybotics systems. It is based primarily on the C language but has specific limitations, such as the maximum number of subroutines and variables allowed, which differ depending on the version of firmware the RCX has. The language was invented by David Baum. He has released two books on the subject.
Contents
Simple program example
A simple test program written in NQC for an RCX with a motor connected to output port A could look like this:
task main () // main program { SetPower(OUT_A, OUT_FULL); // turn on motor A at 100% power OnFor(OUT_A, 200); // let the motor run for 2 seconds, then turn it off }
Thus, motor A will go at full speed for two seconds before being turned off.
Tournament legality
NQC is not legal in any tournaments sanctioned by FIRST. A number of teams have complained about this, so far without success.
Compilers and integrated development environments
NQC compilers and integrated development environments (IDEs) are available for many platforms including Microsoft Windows, Mac OS X, Linux, BeOS and DOS. One is the Bricx Command Center.
Compiler sources:
IDE sources:
External links
The LEGO Group Lego · History of Lego · Timeline · Lego.com Product ranges Current themesAlien Conquest · Architecture · Atlantis · Cars · Castle · City · Creator · Duplo · Games · Harry Potter · Hero Factory · Mindstorms · Minifigures · Modular Houses · Ninjago · Pharaoh's Quest · Pirates of the Caribbean · Racers · SpongeBob SquarePants · Star Wars · Technic
Discontinued4+ · Agents · Adventurers · Alpha Team · Aqua Raiders · Aquazone · Avatar: The Last Airbender · Baby · Batman · Belville · Ben 10: Alien Force · Bionicle · Dino Attack · Exo-Force · Fabuland · Indiana Jones · Mars Mission · Mickey Mouse · Ninja · Pirates · Power Miners · Prince of Persia: The Sands of Time · Quatro · Rock Raiders · Slizer/Throwbots · Spider-Man · Sports · Studios · Time Cruisers · Toy Story · Vikings · Wild West · World Racers
Other productsVideo games · Board games · Design By Me · Films · Serious Play
People Legoland Legoland Billund · Legoland California · Legoland Deutschland · Legoland Florida · Legoland Windsor · Legoland Discovery Centre
Events BrickCon · BrickFair · BrickFest · Brickworld · FIRST Lego League · Junior FIRST Lego League · Robofest
Other topics Category · Portal · WikiProject · Book Categories:- Programming language topic stubs
- Lego Mindstorms
- C programming language family
- Robot programming languages
Wikimedia Foundation. 2010.