JJRobots COMMUNITY

Full Version: error compiling sketch
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
when i try and compile the sketch for the balacing robot i get an error

exit status 1
expected constructor, destructor, or type conversion before '(' token

in the controller area on line
// TIMER 1 : STEPPER MOTOR1 SPEED CONTROL
ISR(TIMER1_COMPA_vect)

(11-05-2019 11:17 AM)dmkmedia Wrote: [ -> ]when i try and compile the sketch for the balacing robot i get an error

exit status 1
expected constructor, destructor, or type conversion before '(' token

in the controller area on line
// TIMER 1 : STEPPER MOTOR1 SPEED CONTROL
ISR(TIMER1_COMPA_vect)

seems to be a problem in this area

Code:
// TIMER 1 : STEPPER MOTOR1 SPEED CONTROL
ISR(TIMER1_COMPA_vect)
{
  if (dir_M1 == 0) // If we are not moving we dont generate a pulse
    return;
  // We generate 1us STEP pulse
  SET(PORTE, 6); // STEP MOTOR 1
  //delay_1us();
  if (dir_M1 > 0)
    steps1--;
  else
    steps1++;
  CLR(PORTE, 6);
}
// TIMER 3 : STEPPER MOTOR2 SPEED CONTROL
ISR(TIMER3_COMPA_vect)
{
  if (dir_M2 == 0) // If we are not moving we dont generate a pulse
    return;
  // We generate 1us STEP pulse
  SET(PORTD, 6); // STEP MOTOR 2
  //delay_1us();
  if (dir_M2 > 0)
    steps2--;
  else
    steps2++;
  CLR(PORTD, 6);
}
just a note i have beenable to upload the test sketh and the board seems fine
Hi, I have the same problem!

Using latest Arduino IDE 1.8.10 and updated all board definitions and libraries. I can upload the test sketch but with the Evo 2 sketch I get the same error...

Did you find a solution?

Regards, Kai
(11-05-2019 12:41 PM)dmkmedia Wrote: [ -> ]just a note i have beenable to upload the test sketh and the board seems fine

What was the problem? Not selecting the right board in the Arduino IDE?
Thats probably not my problem. I selected "Arduino Zero (Native USB port). The test sketch works but the evo sketch doesn't compile.
(11-21-2019 06:09 PM)lab Wrote: [ -> ]Thats probably not my problem. I selected "Arduino Zero (Native USB port). The test sketch works but the evo sketch doesn't compile.

Where did you get the code from? Could you post the link here?
Are all the files extracted in the same folder? Is the folder name the same as the *.ino file?
https://github.com/jjrobots/B-ROBOT_EVO2
it seems like its not for the Devia Robotics Control board v1.0
Right. I got an different code from jjrobots (arduinoe sketch end on " ... _MO" that worked ...
(11-22-2019 01:51 PM)dmkmedia Wrote: [ -> ]https://github.com/jjrobots/B-ROBOT_EVO2
it seems like its not for the Devia Robotics Control board v1.0

I had the same issue, finally I found the correct sources for the M0-Board: https://www.jjrobots.com/wp-content/uplo..._23_M0.zip

Hope it also helps you!
Thanks to all who helped, the problem is solved now. Hope the code goes to the git repo soon.
Pages: 1 2
Reference URL's