Arduino Uno R4 WiFi LESSON 96: Removing Compass Glitches Associated With Wrap Around
Pick your Sunfounder kit up so you get the same results I do:
You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
https://www.patreon.com/PaulMcWhorter
In this video I show you how get high performance calibrated calculations of Roll, Pitch and Yaw from the GY-87 IMU module. In this lesson we will clean up a few issues in the project. First, our project is presently reporting Yaw or Heading at +/- 180 degrees. For a digital compass, the standard notation is to have North correspond to 0 degrees heading, and as you rotate the compass clockwise, the reading should be from 0 to 360. So, we will show you how to get the compass to read the values the world expects from a compass. Second, we are getting ready to build some graphic displays on the SSD1306 OLED display. Presently, we have what is known as a wraparound problem. That is, if we go from 1 degrees heading to 359 degree heading, the complimentary filter will see that as a big change and will filter it. In effect, it will take the compass needle the long way around the dial. So, we have to make an adjustment where we turn the complimentary filter off when we are going across zero degrees. Enjoy!.
[Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. ]
#GY-87
#MPU6050
#Arduino
source
