View Full Version : Gyro I2C help?
Sparkyshires
11-02-2015, 16:57
Hello all,
I'm attempting to work with a gyro from adafruit, specifically the adafru.it/1714 through I2C. My question is this: how exactly would you do this? I know it has something to do with addresses, and processing bytes, but I kinda suck at all that stuff :/ the only address I could find is 0x6B, and I don't know what I'm supposed to do with it. Every other resource I've found seems to say that you need 3 or 4 addresses.
Ben Wolsieffer
11-02-2015, 19:15
It is a fairly large amount of work to get a gyro like this working when there are only a few days left in the build season, especially if you don't have much experience with I2C, but that's not to say it can't be done.
This (https://github.com/adafruit/Adafruit_L3GD20_U/blob/master/Adafruit_L3GD20_U.cpp) is an Arduino driver for the gyro, which will help with the register mappings and addresses.
This (https://gist.github.com/lopsided98/ef6c0f8cacacad9d398b) is a driver I wrote for another I2C gyro, which I hope will help you with understanding how to port the Arduino code to the roboRIO, even though it's in Java.
Sparkyshires
12-02-2015, 08:04
Well the only regional we're going to is a week 4, and we're building two bots, and I honestly don't expect to be finished by bag, so I've got some time to figure it out. Thank you for the resources!
EDIT: For the sake of clarity, It's made of two devices, and the gyro documentation is here (http://www.adafruit.com/datasheets/L3GD20H.pdf) and I think what you're interested in is on page 27, and the accelerometer documentation is here (http://www.adafruit.com/datasheets/LSM303DLHC.PDF), and the I2C information is on pages 12 and 18.
I believe this is information necessary, but I have no idea what to do with it D:
vBulletin® v3.6.4, Copyright ©2000-2017, Jelsoft Enterprises Ltd.