Gyroscope RM G 146 and Arduino Mega

Hi everybody !

I have to implement the RM G146 (Gyroscop, Magneto and Accelerometer Sensors) on an Arduino Mega to stabilize a little submarine. So, here the problem, no way to get the value of the different sensors.. They gave some library with the RMG device but, impossible to import under arduino environment. Does anybody ever succeeded to this operation ?

Thanks you !

This is your sensor board, http://www.roboard.com/G146.html
Since it is all i2c, you should start with the i2c scanner, Arduino Playground - I2cScanner
If the scanner detects the sensors, you can try to find code for the sensors.
I checked the code from roboard.com, and it shows how the i2c communication is done. You could use that to write Arduino code.

LSM303DLH : Code for the Arduino is for example here, Arduino Forum
MPU-3050 : I can't find Arduino code for this one.

Thank you very much, I use the scanner now and it found me 3 devices (even if I have only the rmg and an Arduino plugged..). Please tell me that is the 3 sensors memories adress :slight_smile: . Here the adress:

address 0x18 !
address 0x1E !
address 0x68 !

Your help is very appreciated :wink: !

In fact, the address 0x1E corresponds to the magnetometer, so I guess I've got my answer :). I'm gonna try to get the values ! I 'll tell you what !

I used the library LSM303DLH that you recommended me and itworks ! I had to modify and update the lib but it's okay, i'm able to read the magnetometer and accelerometer at least ! Thanks ;)!

That was a steep learning curve, but I'm glad you have that part working.

Now for the MPU-3050.... If you find good code for that (or make it yourself), perhaps you can let us know.