Rotation with gyroscope (and maybe accelerometer?)


we looking way rotate robot within +/- 5 degrees of accuracy. using this three-axis gyroscope currently. have sample code or on doing this? beneficial pair accelerometer gyro this? (we have accelerometer also.)

right now, we're turning using encoders on wheels, , using calculation based on degrees vs ticks of encoders. works decently; however, in environments different (or slanted) surfaced, turns inaccurate.

advice or other appreciated, if other using gyro/accelerometer.

edit: not looking orientation data. want rotate robot 90 degrees, or many degrees pass via turn function. turn, powering 1 side positive speed , other negative speed make point turn.

thanks.

do want "rotate" robot amount, determined level of accuracy, or know final orientation (with respect direction north) accuracy?


Arduino Forum > Using Arduino > Programming Questions > Rotation with gyroscope (and maybe accelerometer?)


arduino

Comments

Popular posts from this blog

invalid use of void expresion in FlexiTimer2 library

error: a function-definition is not allowed here before '{' token

LED Strip Code