Academic Hardware Products (myDAQ, myRIO)

cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring GY271 Compass

I'm trying to configure the registers for my 3-Axis Magnetic Sensor QMC5883L (GY271), I have obtained the compass address which appeared to be (x 0D). Now, to configure the compass registers I added the write/read registers in a sequence following the datasheet.

 

  • Control Register 1
    • 256, 8G, 200Hz, continuous mode.
  • Control Register 2
  • SET/RESET Period Register

But I only get a constant value of the x-axis. I have also changed the data of Control Register 1, but i still get the same result.

Download All
0 Kudos
Message 1 of 2
(2,798 Views)

Hello Osama,

 

As you may already know, in the I2C protocol, it is necessary to specify the Register Address before sending the data byte to write. The Address of the Control Register 1 is 0x09. However, in the image you attached, it looks like you specified the Address 0x00 instead.

 

This video gives an example of how to develop a LabVIEW program to configure and read the signal of an accelerometer using a myRIO. I hope you find it useful.

 

Could you also share a screenshot that shows how you are reading the X, Y and Z registers?

 

Regards,

 

Gustave 

Message 2 of 2
(2,766 Views)