NQC Programming Basics
Preliminaries: Installing the Firmware.
NQC Programmer's Reference Sheet - NQC 2.2 r1 - Target RCX2 - by Matthew Bates
Sample Programs
The following sample programs are presented in a progressive manner, starting with the simplest of capabilities and building to more complicated program structures.
Out the Door
This is a simple program with one main task. It gets the robot out the door.Bump A Lot
In this program we use the while(true) infinite loop and a second task.Bump A Lot 2
Bump A Lot is modified to utilize in-line functions, playsoundL and playsoundR, to make audible tones corresponding to the direction the robot turns.Scanner 1
Robot searches for a light source, locks on to that source, and travels in that direction.Scanner 2
Blends capabilities of Scanner 1 with Bump A Lot 2.
Sample Robot Designs
These robot designs are sufficient to run the sample programs above. Other designs may also work well with these programs.
Tankbot Construction
A simple yet strong robot with two motors. This is the minimal robot for Out the Door.Scanbot Construction
Based on the Tankbot design, we add one more motor to rotate the scanner and a rotation sensor for feedback.
Communication Between the Robot and Tower
Robot to Tower communications.
Tower Communications
The robot communicates back to the computer via the IR tower.