Quote:
Originally Posted by dboisvert
Code:
// Encoders
encoderMotor1 = new Encoder(3,4);
encoderMotor2 = new Encoder(5,6);
Code:
void EncoderInit(void) {
encoderMotor1.Start();
encoderMotor2.Start();
}
We receive errors on the lines encoderMotor1.Start(); & encoderMotor2.Start();
|
Your
encoderMotorN variables are pointers to Encoder objects. The C++ "dot" syntax is used with objects themselves; use the "->" syntax instead when working with object pointers, like this:
Code:
void EncoderInit(void) {
encoderMotor1->Start();
encoderMotor2->Start();
}
Doesn't the Get() method return a
float? The
%d format specifier in your printf() is probably going to be an issue.