View Full Version : Code for Optical Encoders
Ctrl Alt Delete
10-25-2006, 03:09 PM
I've looked, but I haven't found any code for the optical shaft encoders. Anyone know of any resources for it? (Using MPLAB)
MattD
10-25-2006, 07:30 PM
I've looked, but I haven't found any code for the optical shaft encoders. Anyone know of any resources for it? (Using MPLAB)
VexLabs has sensor test code (http://www.vexlabs.com/docs/VexSensorTest.zip) as well as other Vex programming resources on the downloads page (http://www.vexlabs.com/vex-robotics-downloads.shtml). The sensor test has sample code for the encoders in the user_routines_sensor_test_fast.c file.
BradAMiller
10-26-2006, 03:54 AM
I've looked, but I haven't found any code for the optical shaft encoders. Anyone know of any resources for it? (Using MPLAB)
WPILib also has built-in support for optical encoders (either quadrature or single-line). You just call a function to start it and another to get the value whenever you want it. You can get WPILib here. (http://www.wpi.edu/~bamiller/WPILib). WPILIb can be used with MPLab or eclipse and has a complete set of functions to support all the FIRST supplied sensors (including the CMU Camera) as well as a number of others.
Brad
vBulletin® v3.6.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.