Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
error compiling sketch
11-05-2019, 11:17 AM (This post was last modified: 11-05-2019 11:28 AM by dmkmedia.)
Post: #1
error compiling sketch
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);
}
Find all posts by this user
Quote this message in a reply
11-05-2019, 12:41 PM
Post: #2
RE: error compiling sketch
just a note i have beenable to upload the test sketh and the board seems fine
Find all posts by this user
Quote this message in a reply
11-21-2019, 06:24 AM
Post: #3
RE: error compiling sketch
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
Find all posts by this user
Quote this message in a reply
11-21-2019, 09:06 AM
Post: #4
RE: error compiling sketch
(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?
Visit this user's website Find all posts by this user
Quote this message in a reply
11-21-2019, 06:09 PM
Post: #5
RE: error compiling sketch
Thats probably not my problem. I selected "Arduino Zero (Native USB port). The test sketch works but the evo sketch doesn't compile.
Find all posts by this user
Quote this message in a reply
11-22-2019, 11:27 AM
Post: #6
RE: error compiling sketch
(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?
Visit this user's website Find all posts by this user
Quote this message in a reply
11-22-2019, 01:51 PM
Post: #7
RE: error compiling sketch
https://github.com/jjrobots/B-ROBOT_EVO2
it seems like its not for the Devia Robotics Control board v1.0
Find all posts by this user
Quote this message in a reply
11-24-2019, 12:49 PM
Post: #8
RE: error compiling sketch
Right. I got an different code from jjrobots (arduinoe sketch end on " ... _MO" that worked ...
Find all posts by this user
Quote this message in a reply
11-24-2019, 05:34 PM
Post: #9
RE: error compiling sketch
(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!
Find all posts by this user
Quote this message in a reply
11-27-2019, 05:56 AM
Post: #10
RE: error compiling sketch
Thanks to all who helped, the problem is solved now. Hope the code goes to the git repo soon.
Find all posts by this user
Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)