|
programing the vex optical shaft encoder
i'm having a small problem w/ optical shaft encoders on the vex swervebot i'm building. the encoders tell the rc how far the drive pods have turned.
in the program, i start all the encoders, and have them retrive to variables. once the vairables reach a the right value, the pods stop turning, then i reset the variables when the pods need to turn back.
my problem is that i allign all the pods, but when i test the program, they don't all turn the same amount, so they're off when they come back. i think it might be how i set up the motors to run.
can anyone help me fix this? i'm including a copy of my code
__________________
 
"C.N.C." lyrics/"Driving on Regolith" lyrics
Let's all go nuts! Robots! Robots!--Team 461 chant
|