View Single Post
  #4   Spotlight this post!  
Unread Today, 15:05
Andrew Lobos Andrew Lobos is online now
Registered User
FRC #0225 (TechFire)
Team Role: Mentor
 
Join Date: Feb 2011
Rookie Year: 2011
Location: Lancaster, PA
Posts: 62
Andrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the roughAndrew Lobos is a jewel in the rough
Re: Gyroscope -> Arduino -> RoboRIO

I've used the BNO055 on some personal projects involving a cRIO - here's the "driver" I wrote for talking to it (mostly based on Adafruit's python library): https://github.com/4ndr3w/BallBot/bl...ter/BNO055.cpp

Some notes if you move forward with something based on this:
  • Since this wasn't a competition robot and just a fun project, I just used while loops to structure the init process. You DO NOT want to copy-paste this as-is in your code - it will lock up if the gyro doesn't finish initializing
  • getYaw() assumes big endian
  • If I remember correctly shift-left by one is an artifact of the cRIO addressing and not required on the roboRIO

EDIT:

Just wanted to tack on that there are a ton of COTS gyro solutions that let you avoid headache, like Oblarg said:

- WCP's Spartan board with the ADXRS450 gyro (we use)
- CTRE's Pigeon IMU
- NavX
- If you're just looking to do some simple gyro turns/drive straight in auto, you could use an analog gyro and be pretty safe
__________________
2012-2014: 225 Driver, Programmer & Co-Captain
2012-2014: FTC 4977 Driver, Programmer, & Team Captain
2011: 225 Operator & Programmer

2013: FRC: Springside-Chestnut Hill Winner (w/341 & 1495), Midknight Mayhem Winner (w/316, 369, & 869), Battle O' Baltimore Winner (w/1640, 2914 & 339), Duel on the Delaware Finalist (w/816 & 369), Ramp Riot Winner (w/341, 304, & 4637) FTC: PA State Finalist
2014: FRC: Springside-Chestnut Hill Winner (w/316 & 1495), Greater DC Winner (w/1731 & 4464), Midknight Mayhem Winner (w/25, 1626 & 329) FTC: PA State Champion

Last edited by Andrew Lobos : Today at 15:17.
Reply With Quote