NXC Sample Programs
- NXTCounter.zip - This zip contains a cool digital counter
sample program and tutorial developed by Morton Goldberg, who has made significant contributions to
improving NXC and its documentation. Check it out!
- nodewalker.zip - This zip contains a small sample program
that demonstrate how you might develop a simple "lode runner" style of game for the NXT.
- 485.zip - This zip contains a pair of programs
that demonstrate how to send messages from one NXT to another over the hi-speed
RS-485 port.
- letters.zip - This zip contains
a small program that demonstrates how to use GraphicOutEx and a parameterized
RIC file. It draws small chunks of the full tiled Sprite in the RIC file
depending on the value passed as the first element (0) in the values array.
The commented out version of the test program at the end of the file is written
by Andreas Dreier, the author of nxtRICedit.
- pong.zip - This zip contains two versions of
a very cool version of the old Pong game. It is written by Michael Anderson (mian@##NO##SPAM##pobox.com).
- DirectCommandsTests.zip - This zip
contains three NXC programs which demonstrate how to send direct commands from one
NXT to another via Bluetooth.
- Killough.zip - This zip
contains a pair of NXC programs for operating a killough platform robot like the Omni.
It is written by Julien Letrouit.
- movemusic.zip - This zip contains two
simple NXC programs which demonstrate how to run multiple tasks concurrently.
- spitter.zip - This zip contains a program
written by Sivan Toledo. It shows off a number of important NXC language features. See Sivan's
Spitter page for more information.
- followline.zip - This zip contains sample line
following programs that were ported from a simple
pbLua line following program. One
is written in NBC with the code being tuned for maximum possible speed. FollowLine.nxc is a
straight NXC version of the same algorithm. FollowLine2.nxc uses macros and asm blocks
to speed up the generated code.
- dot_tail.zip - This zip contains a simple
NXC program written by Carl Sturmer which uses arrays and drawing routines.
It draws a dot with a tail on the NXT screen. I think it is pretty cool.
- alpha_rex_nxc.zip - This zip contains
a really great program written for the NXT Alpha Rex robot in NXC.
Graham Hawkins (grahamhawkins@yahoo.##spam##off##.com) is the author.
This code demonstrates many important NXC programming techniques including multi-threading,
using subroutines, controlling motors from concurrent threads, reading various sensors,
and displaying graphics on the NXT screen. It's a beautiful example of what you can do very
easily in NXC.
- nxcsamples.zip - This zip contains
a few miscellaneous sample programs written in Not eXactly C (NXC).
Beta 27 or later of NBC can be used to compile and download these programs to the NXT brick.