Hello Chief Delphi,
Our team recently ordered new gyros. We decided to go with the EVAL-ADXRS453Z boards. (
http://www.analog.com/en/products/me...duct-overview).
The gyroscopes run on the SPI bus, and do not use an analog input like the KOP gyros. We have never programmed using SPI before, and we were hoping we could get some help. We have looked through the WPILib class documentation, and searched for examples, but we are having a hard time finding any. Also, it seems like there are no built in SPI examples this year in Eclipse.
We have written some base initialization code such as,
Code:
SPI spiGyro = new SPI(Port.kOnboardCS0) ;
spiGyro.setClockRate(4000000);
spiGyro.setClockActiveHigh();
spiGyro.setChipSelectActiveLow();
spiGyro.setMSBFirst();
However, we do not know where to go from here. From the class documentation, it seems like we could have to use a combination of the read, write and transaction methods in order to receive data from the sensor.
If any of you have used SPI in the past, have example code we could look at, or just help us out, that would be greatly appreciated.