Machine Robot Demo 1: Autonomous data aquisition and ploting.


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.


Requirements:


Program logic:

picture: Autonomous control diagram

Program Output:

Picture: Top view of enviroment

Set up:

This demonstration was performed by setting the number of data points to 90 and the angle step size to 2°.

enum{numpoints=90};
const int anglestep=2;

The result was that data was collected from 0° (the start position) to 180°(the end position) in 2° increments.

Picture: Output from demonstration