![]() The problem persists when I use the MegaServo.h library. Oddly, however, the pitch rate measurement (reading around the y-axis) is undisturbed and yields correct angle estimate - where I have used exactly the same method to determine pitch and roll characteristics. The sensor code works perfectly well when it is run stand-alone, but as soon as I attach the servo, via servo.attach(), my roll rate measurement (gyroscope reading around the x-axis) blows up and consequently corrupts my angle estimation (The rate goes from ~0.0001 rad/s to -6750000 rad/s). With these two readings, I am combining them using a filter to create an estimate of the orientation angle of the sensor (see attached code). I am using the adafruit sensor library to read the sensors (gyroscope data and the accelerometer data). ![]() ![]() ![]() ![]() In its barest form, I am trying to continuously control a linear actuator (6V servo) and read a gyroscope/accelerometer IMU (Adafruit 10 DOF IMU) simultaneously using my Arduino Mega 2560.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |