Pololu Robotics & Electronics
Menu
My account Comments or questions? About Pololu Contact Ordering information Distributors

Pololu Forum

Zumo 32U4 turn using gyro

I was looking around and found this example to resist the robot from changing the calibrated position after pressing the button. https://github.com/pololu/zumo-32u4-arduino-library/tree/master/examples/RotationResist
I just need some help in finding a way to make do a 360 turn using the gyro. If there is a similar example of just turning the robot to a certain degree it would be great too.

You might want to check out the following on GitHub


The turn sensor helper files are pretty good. I have my students work with those. Some of my more math incline students actually write their own code.
Craven has done a pretty good job.

Also, if you are working on your own code, you are working with a unit circle, which means you need to be aware of your position and negative turning direction.

A properly calibrated magnetometer (compass) allows you to determine the absolute direction of the robot’s travel, and that is all you need to do a 360 degree turn. One is built in to your Zumo.

For a calibration example, see this post: Correcting the Balboa magnetometer