Society of Robots - Robot Forum

General Misc => Misc => Topic started by: ert481 on March 07, 2010, 05:37:45 PM

Title: $50 robot question
Post by: ert481 on March 07, 2010, 05:37:45 PM
here is the code in the header file
Code: [Select]
void servo_left(signed long int speed)
{
PORT_ON(PORTD, 0);
delay_cycles(speed);
PORT_OFF(PORTD, 0);//keep off
delay_cycles(200);
}
how can i change it so the robot can go backwards?
you cant do this servo_left(-50)
because you cant delay the cycles for -50.
so how can i change it so i can?