Hello, I need help implementing a servo-motor to rotate according to a gyroscope. The motor should first start at a pulse width of 1ms, which corresponds to 0 degrees. Then it should rotate from 0 to 180 degree, going from 1ms to 2ms pulse width. I used the ‘yaw’ value obtained from the gyroscope to set the pulse width. For some reason this code made the servo-motor unresponsive to the gyroscope; the motor rotating continuously 360 degrees.
Test.ino (3.14 KB)