I need almost anything specific to the gyro for FIRST.
I can’t find the data sheet for the gyro card, just the chip from Analog Devices.
What’s the port number for the gyro port built into the Rio?
Has anyone successfully hooked it up to a different port?
The Java samples use a Gyro class, but this documentation uses a more specific ADXRS450_gyro class. (see link)
What’s the Cso mentioned in the documentation?
How do you calibrate it?
Thanks for any help.
During the 2017 season our team used these and in our code we used the “SPI.Port.kOnboardCS0” port and that worked.
In the 2017 season we never calibrated the gyro however looking back that would have been a good idea but lets imagine that you create your gyro object like this. “ADXRS450_Gyro gyro = new ADXRS450_Gyro(SPI.Port.kOnboardCS0);” then to calibrate the gyro we would need to add this line of code “gyro.calibrate();” however you need to think about where in the code you are going to be putting this, you can put it in your constructor where the gyro will be calibrate when the robot starts up however you then need to turn your robot on after you have already put it on the field due to the fact that you need to have the robot not moving when you calibrate the gyro. The other thing you could do is put it in auton init however the gyro does take time to calibrate so you might lag behind in your auton phase. Another note is im not sure what you are using your gyro for but something that we found in the offseason is that the FIRST gyro did not have a fast enough degrees per second to use for field orientated driving.
Here is our 2017 code… HERE
This is the gyro information… HERE
Yea, thanks, we’ll try that to initialize the gyro.
And thanks for the discussion on the calibrate concerns / experiences.
Hopefully I’ll get a chance to look at your code.
Unfortunately, the gyro information seems to be specific to the chip, not the board. So it’s pretty tricky to get to usable info from it without tracing circuit runs on the board. Unless I’m missing something, that is.
What information are you looking for about this board then?
We put together some user guides for setting up the Analog Devices gyro. The board is specific to FRC and at this point isn’t a formal product. You can find the user guides here: wiki.analog.com/first
The CS0 is the Chip Select number (also sometimes referred to as what spi port you’re using). This is the SPI port number referred to by the code. If you want to change that, you’ll need to change it in code AND on the board. Can you tell me what year you got your gyro and what programming language you’re using? There are a couple of different versions in the wild so I’ll need to know which one you have to help you configure it.
@Phoenix2019 Were you able to resolve the issues you were having with the ADXRS450 gyro board? Let me know if you still have any questions or need help getting started!