|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
| Thread Tools | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Accelerometer
So I'm trying to implement the accelerometer, and i get several errors.
Code:
RobotDemo(void):
myRobot(1, 2, 3, 4), // these must be initialized in the same order
leftstick(1), // as they are declared above.
rightstick(2), // as they are declared above.
gyro(1,1),
acc(I2C)
{
Code:
C:/WindRiver/workspace/Final/MyRobot.cpp:34: error: expected primary-expression before ')' token |
|
#2
|
||||
|
||||
|
Re: Accelerometer
bump
|
|
#3
|
|||||
|
|||||
|
Re: Accelerometer
Be patient. It was less than a half hour before your "bump".
Have you looked at the documentation for the ADXL345_I2C class? Is there anything you don't understand about it? |
|
#4
|
|||
|
|||
|
Re: Accelerometer
Quote:
|
|
#5
|
||||
|
||||
|
Re: Accelerometer
Quote:
line 34 is "acc(I2C)" And yes I have looked at the documentation but it didn't really help me that much. It just told me that it needed a slot and a PID source. But because the accelerometer is connected to the I2C section I can't get it to work. |
|
#6
|
||||
|
||||
|
Re: Accelerometer
|
|
#7
|
|||
|
|||
|
Re: Accelerometer
Quote:
Again, what is I2C? A macro? A constant? |
|
#8
|
|||||
|
|||||
|
Re: Accelerometer
Quote:
Quote:
|
|
#9
|
|||
|
|||
|
Re: Accelerometer
Elliot did not post his entire source code, there could be a constant or preprocessor definition above the class definition.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|