Hey, apologies if this is an already answered question. I couldn't find anything on the topic.
The problem that we're having is whenever we state the accelerometer (not even doing anything with it, but just instantiating it), our robot components stop working completely. The robot won't move, et cetera.
Also, we don't know how to get the values from the gyro once in teleop, or rather the method to use to get the values from the accelerometer.
This is our code:
Code:
class RobotDemo : public SimpleRobot
{
RobotDrive myRobot; // robot drive system
Joystick stick1, stick2; // only joystick
ADXL345_SPI adxl;
Code:
public:
RobotDemo(void):
myRobot(2, 1), // these must be initialized in the same order
stick1(1), // as they are declared above.
stick2(2),
adxl(5, 6, 7, 8, ADXL345_SPI::kRange_2G)
Thanks in advance!