View Single Post
  #11   Spotlight this post!  
Unread 29-01-2008, 06:42
programmr's Avatar
programmr programmr is offline
Registered User
AKA: Face
FRC #0522
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2006
Location: Staten Island, NY
Posts: 83
programmr is a jewel in the roughprogrammr is a jewel in the roughprogrammr is a jewel in the rough
Send a message via AIM to programmr
Re: Program a motor to turn on and off every other second.....

IT STILL SAYS : "G:\2005\test pulse\user_routines.c:232:Error: syntax error"


void code()
{ THIS IS LINE 232 HELP PLEASE....
static unsigned char loops = 0; // which loop are we on?
if (p3_sw_trig != 0)
{
loops++; // add 1 to the loop counter
if (loops <= 44) {
pwm01 = 127; // motor off
} else if (loops <= 88) {
pwm01 = 0; // motor on
} else {
loops = 0; // go back to 0
}
} else {
pwm01 = 127; // switch not on, motor is off!
}
}


Someone please help me try to get this issue resolved. Thank You