JJRobots COMMUNITY
error compiling sketch - Printable Version

+- JJRobots COMMUNITY (http://forums.jjrobots.com)
+-- Forum: JJrobots (/forumdisplay.php?fid=1)
+--- Forum: B-Robot (/forumdisplay.php?fid=2)
+--- Thread: error compiling sketch (/showthread.php?tid=2227)

Pages: 1 2


error compiling sketch - dmkmedia - 11-05-2019 11:17 AM

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);
}



RE: error compiling sketch - dmkmedia - 11-05-2019 12:41 PM

just a note i have beenable to upload the test sketh and the board seems fine


RE: error compiling sketch - lab - 11-21-2019 06:24 AM

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


RE: error compiling sketch - JJrobots JP - 11-21-2019 09:06 AM

(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?


RE: error compiling sketch - lab - 11-21-2019 06:09 PM

Thats probably not my problem. I selected "Arduino Zero (Native USB port). The test sketch works but the evo sketch doesn't compile.


RE: error compiling sketch - JJrobots JP - 11-22-2019 11:27 AM

(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?


RE: error compiling sketch - dmkmedia - 11-22-2019 01:51 PM

https://github.com/jjrobots/B-ROBOT_EVO2
it seems like its not for the Devia Robotics Control board v1.0


RE: error compiling sketch - lab2 - 11-24-2019 12:49 PM

Right. I got an different code from jjrobots (arduinoe sketch end on " ... _MO" that worked ...


RE: error compiling sketch - Kritzelblitz - 11-24-2019 05:34 PM

(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/uploads/2019/09/BROBOT_EVO2_23_M0.zip

Hope it also helps you!


RE: error compiling sketch - lab - 11-27-2019 05:56 AM

Thanks to all who helped, the problem is solved now. Hope the code goes to the git repo soon.