Not eXactly C
Encyclopedia
Not eXactly C, or NXC, is a high-level programming language for the Lego Mindstorms NXT
Lego Mindstorms NXT
Lego Mindstorms NXT is a programmable robotics kit released by Lego in late July 2006.It replaced the first-generation Lego Mindstorms kit, which was called the Robotics Invention System. The base kit ships in two versions: the Retail Version and the Education Base Set . It comes with the NXT-G...

. NXC, which is short for Not eXactly C, is based on Next Byte Codes
Next Byte Codes
Next Byte Codes is a simple language with an assembly language syntax that can be used to program Lego Mindstorms NXT programmable bricks. The command line compiler outputs NXT compatible machine code, and is supported on Windows, Mac OS and Linux...

, an assembly language
Assembly language
An assembly language is a low-level programming language for computers, microprocessors, microcontrollers, and other programmable devices. It implements a symbolic representation of the machine codes and other constants needed to program a given CPU architecture...

. NXC has a syntax like C
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

. The IDE
Integrated development environment
An integrated development environment is a software application that provides comprehensive facilities to computer programmers for software development...

 for NXC is the Bricx Command Center
Bricx Command Center
Bricx Command Center is the integrated development environment of Next Byte Codes , Not Quite C and Not eXactly C . These programming languages are used to program the Robots in the Lego Mindstorms series. Not Quite C and Not eXactly C have a syntax like C...

.

The NXC compiler is available under the Mozilla Public License
Mozilla Public License
The Mozilla Public License is a free and open source software license. Version 1.0 was developed by Mitchell Baker when she worked as a lawyer at Netscape Communications Corporation and version 1.1 at the Mozilla Foundation...

. http://bricxcc.sourceforge.net/nxc/ A sample code is as shown below:

task main //sets a new task. main is compulsory
{
OnFwd(OUT_BC,75); //ask the motors connected to ports B and C to move forward at a power of 75.
Wait(5000); //wait for 5 seconds (note that 1000 = 1 second)
Off(OUT_BC); //off the motors connected to ports B and C
}

See also

  • Lego Mindstorms
    Lego Mindstorms
    The LEGO Mindstorm series of kits contain software and hardware to create small, customizable and programmable robots. They include a programmable 'Brick' computer that controls the system, a set of modular sensors and motors, and LEGO parts from the Technics line to create the mechanical...

  • Lego Mindstorms NXT
    Lego Mindstorms NXT
    Lego Mindstorms NXT is a programmable robotics kit released by Lego in late July 2006.It replaced the first-generation Lego Mindstorms kit, which was called the Robotics Invention System. The base kit ships in two versions: the Retail Version and the Education Base Set . It comes with the NXT-G...

  • Lego Mindstorms NXT 2.0
    Lego Mindstorms NXT 2.0
    Lego Mindstorms NXT 2.0 is the newest set from LEGO's Lego Mindstorms series, launched on August 5, 2009 at the Lego Shop in the U.S. The set contains 619 pieces, including a new sensor that can detect colors. It is priced at approximately 280 US $ or 230 £....

  • Robotics Invention System
  • URBI
    URBI
    Urbi is an open source cross-platform software platform in C++ used to develop applications for robotics and complex systems. Urbi is based on the UObject distributed C++ component architecture. It also includes the urbiscript orchestration language which is a parallel and event-driven script...

  • Bricx Command Center
    Bricx Command Center
    Bricx Command Center is the integrated development environment of Next Byte Codes , Not Quite C and Not eXactly C . These programming languages are used to program the Robots in the Lego Mindstorms series. Not Quite C and Not eXactly C have a syntax like C...

  • Not Quite C

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK