Go Down

Topic: The GY-26 Compass sensor module (Read 5119 times) previous topic - next topic

Nesredna

Hi. anyone who has any experience with the GY-26 digital compass sensor module....
having a hard time finding something usefully anywhere.
starting to think it was a bad idea buying one of these.

Anyone with any info will be highly appreciated.  :)

best regards...

AWOL

Quote
starting to think it was a bad idea buying one of these

Why?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

johnwasser


Hi. anyone who has any experience with the GY-26 digital compass sensor module....
having a hard time finding something usefully anywhere.


No experience but it looks fairly simple:
http://www.elechouse.com/elechouse/images/product/GY-26-USART%20Digital%20Compass/gy-26%20manual.pdf
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

ArduinoM

Hi,
I was just ordering this module....

Using it in IIC mode, how would I get compass reading.
I mean it sais in the manual that reading 0x01 address gives the 8bit HIGH of the angle and address 0x02 gives the low 8bits
So how do I translate this into real degrees??

Is the output in steps of 0.1 or 0.01 degrees per bite or what (since serial response is in 0.1deg resolution) ? the manual is somwhat unclear on I2c response and only shows what to write to get response...
Do I need to map UART (serial) response against I2c response to decode this?

Butchman2000

The program provided by drix at:
http://iteadstudio.com/iforum/viewtopic.php?f=16&t=1963&p=9229#p9229
is sufficient to talk to the compass. It also prints the first three bits from the compass' measurement, of which only the second and third bits are meaningful. HOWEVER, the compass reading stays the same. The three bits output appears as 0 239 239 over and over again. The calculated angle is then -411, and that doesnt change either. Nothing changes no matter what angle the compass is when it is started or while the program is running. I tried a few program variations but nothing seems to work. I really need this to work because my project is due in a few weeks. PLEASE HELP ME.Butchman2000
 
Posts: 1
Joined: Tue Jan 10, 2012 8:21 pm

johnwasser


It also prints the first three bytes from the compass' measurement, of which only the second and third bits are meaningful. HOWEVER, the compass reading stays the same. The three bytes output appears as 0 239 239 over and over again.


That is very strange.  The value 239 (decimal) will not fit in a byte.  The code actually shows the values are displayed in HEX so 0x239 is 569 which is WAY too big to fit in a byte. You also don't show the part where is prints "Received angle: ".  Perhaps you copied and pasted the code incorrectly?
Send Bitcoin tips to: 1L3CTDoTgrXNA5WyF77uWqt4gUdye9mezN
Send Litecoin tips to : LVtpaq6JgJAZwvnVq3ftVeHafWkcpmuR1e

AWOL

Quote
The value 239 (decimal) will not fit in a byte.

Wuh?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

andaiden

Hello everyone.

Im new here. I just got the gy-26 compass and i connected it to a usb->rs232 converter. Im using a common comport transmitter to send data to my compass. When I send C0 as hex the led does turn on so it means im in calibration mode. Thats fine

But after i get out of calibration mode i try to send 31 as hex and i get nothing back accept for a 31hex back. I cannot get any readings from it. I connected everything directly without any use of capacitors etc etc. All gnd together and both vcc together. Ok like that?

Appreciate your help.
Thanks

someone already managed to put it to work?

Hello, here's an example of the code in this link, serial connection http://www.higoraraujo.com.br/?p=1007

Go Up