Quote:
Originally Posted by progal
whenever we [instantiate] the accelerometer ... our robot components stop working completely.
Code:
adxl(5, 6, 7, 8, ADXL345_SPI::kRange_2G)
|
The constructor for ADXL345_SPI takes the digital IO module as the first parameter and has a default kRange_2G value for the 6th parameter. You are asking it to use a non-existant module #5 which probably causes the robot code to crash. Do you see an error message about using a module out of range?
If you only have one digital IO module in the cRIO, it will be module #1.
Does the following code work better?
Code:
adxl(1, 5, 6, 7, 8)