|
Re: gyro problem
try using a feedback loop...a simple one would look like:
turn = turn - temp_gyro_angle / 15;
or something like that. this will get you (theoretically) a robot that always points forward. you may want to make the ratio that you multiply temp_gyro_angle by higher or lower depending on how fast/slow you want it to correct.
also, gnormhurst, he couldn't be overflowing because turn is set every step...
__________________
A few of my favorite numbers:
175 176 177 195 230 558 716 1024 1071 1592 1784 1816
RPI 2012
BREAKAWAY
|