Search the Community
Showing results for tags 'compass'.
-
CMPS2 compass module with Arduino - Heading steps accuracy
Erosand posted a question in Add-on Boards
Hi! I'm using the CMPS2 compass module with an Arduino Uno and the example code from https://reference.digilentinc.com/reference/pmod/pmodcmps2/start#example_projects to get a heading from the compass module, but it seems to be only jumping between specific values and never taking the values in between. For example, running the program while keeping the module horizontal and slowly spinnng it 360° around the z-axis gives an output like this: Heading = 231.18° Heading = 231.19° Heading = 186.09° Heading = 141.09° Heading = 186.12° Heading = 231.10° -
Hello, I am using the digilent CMPS2 module which uses the Memsic MMC34160PJ magnetometer. In the datasheet of chip CMPS2 there is a formula with actan(x/y)*180/pi. Is it right to use for x and y only the LSB (8 bits) multiplied with the number 0,48.... as shown in the datasheet in point 1? It‘s clear that I only get values between 0 and 90 degrees because the sensor delivers only unsigned values. When I use atan2 I get values between 0 and 180 degrees. I know it would be easier if I had signed data. But unfortunately the sensor delivers only unsigned values. How
- 5 replies
-
- magnetometer
- degree
-
(and 2 more)
Tagged with:
-
Hi, I am working with the Pmod CMPS2 and an Arduino Uno to get an accurate reading of the direction a user is facing for a personal project. I am having trouble writing the code since the code on the website on Reference Materials is giving me a lot of errors. Is there any other code I can try?