Hello. So i am making a line follower robot and to help me make certain 90 degree turns i need help from a gyro sensor. I previously worked with lego mindstorm which had a gyro sensor that could easily detect the car going right or left but now using arduino the gyro i bought (MPU-9050) is only detecting tilts across x and y axis and not turns. Can someone please help me detect right or left turns with this sensor
Flip the sensor so that either x or y represent the vertical z axis.
Tilt code, using the accelerometer, will do that.
To detect turns using the rate gyro, you need to integrate the gyro output with respect to time. The gyro must first be calibrated (offsets determined and subtracted).
Could you possibly know any helpful guides for gyro sensor? Sorry for annoying you
Use your favorite search engine with the phrase "arduino integrate gyro" to find tutorials.
The yaw angle will be relative to the starting orientation and will drift rapidly, unless you have carefully calibrated the gyro (second part of the tutorial above).
This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.