In this code to test servos I get an error for the "sleep" function.
The error is: "warning: implicit declaration of function 'sleep' is invalid in C99.
What does that error refer to ??
int main() {
printf("Powering servo to its center position\n");
set_servo_position(3, 1000);
enable_servos();
sleep(4);
printf("Sending servo to position 200\n");
set_servo_position(3, 200);
sleep(4);
printf("Sending servo to position 1800\n");
set_servo_position(3, 1800);
sleep(4);
printf("Turning servos off\n");
disable_servos();
}
sleep is a non-standard function.
On UNIX, you shall include .
On MS-Windows, Sleep is rather from .
In every case, check the documentation.
thesis writing service