View Single Post
  #1   Spotlight this post!  
Unread Today, 14:07
shadow.tar.gz's Avatar
shadow.tar.gz shadow.tar.gz is offline
Registered User
AKA: Manpreet Singh
FRC #3786 (Chargers)
Team Role: Mentor
 
Join Date: Feb 2017
Rookie Year: 2014
Location: Seattle
Posts: 4
shadow.tar.gz is an unknown quantity at this point
Gyroscope -> Arduino -> RoboRIO

We're trying to use a Gyroscope on our robot this year. The gyroscope we're trying to use is the Adafruit BNO055. So far, the way we're found to get information from it is with an Arduino Driver that adafruit provides. So naturally we are trying to get the data from the gyroscope with an arduino, and then trying to pipe it to the RoboRIO.

We got the arduino to read the Gyroscope no problem. But now we're trying to get the arduino to pipe the data to the RoboRIO via the I2C bus. We threw some code together, for both the RoboRIO side of things, and the Arduino side of things.

So the trouble is, we don't know how to use the Wire library on the Arduino to send the gyroscope values back to the RoboRIO when it asks for them. We got the RoboRIO to send over data to the Arduino, telling it what to send, but we can't get the arduino to send anything back.

When sending data back to the RoboRIO(the master) device, do we need to specify the address of the device? Asking since the Arduino acts as the master device to the Gyroscope, but a Slave device to the RoboRIO.

We've tried the I2C address scanner code to try and find the address for the roborRIO that way. But then we found that there was a board from Rev robotics called the RIODuino, which has example code using the I2C bus. So we found that the examples used the address of 84. We tried telling the Wire library to begin a Transmission with device 84, but that made the Arduino sketch crash.

Is it worth it to try and write our own Driver for the Gyroscope and remove the Arduino middle man altogether?
Reply With Quote