The purpose of this demo is to demonstrate the CH Mindstorms Control Package's ability to control the machine robot model autonomously, as well as demonstrate how to use the package to collect and plot sensor data from the Mindstorms NXT.
This demonstration uses the machine robot model with the addition of the ultrasonic sensor on the end of the arm. The program code then sends commands to the NXT to rotate the arm a set number of degrees and get the distance from the ultrasonic sensor. The code also gets feedback from the motor's tachometer to get the angle of the arm. Both the data from the ultrasonic sensor and the data from the tachometer are stored in two separate arrays and used in the output file and the CH plotting functions.