Sample code for sensors

I was wondering if there is any sample code for using the ultrasonic and other new sensors available.

We have publishing some test code (using MPLAB) for some sensors on our Downloads page http://www.vexlabs.com/vex-robotics-downloads.shtml. We do not provide support for these sensor tests or the code written for the tests. This is provided only as an example of code to interface with some sensors. It is left up to the user to find the corresponding code for a sensor in the test code provided. The test procedure provides a quick go/no-go test for the following VEX sensors: Light Sensor, Line Follower Sensor, Ultra-Sonic Sensor, and Optical Shaft Encoder. The test procedure and code can be used to verify if a sensor is working.


Ricky Torrance
Electrical Engineer
VexLABS