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
Post Reply 


Forum Jump:


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