Code:
// C++ code//#include <Servo.h>
Servo servo_12;
int counter;
void setup(){ servo_12.attach(12, 500, 2500);
for (counter = 0; counter < 10; ++counter) { servo_12.write(120); delay(1000); // Wait for 1000 millisecond(s) servo_12.write(0); delay(1000); // Wait for 1000 millisecond(s) }}
void loop(){ delay(10); // Delay a little bit to improve simulation performance}
Servo servo_12;
int counter;
void setup(){ servo_12.attach(12, 500, 2500);
for (counter = 0; counter < 10; ++counter) { servo_12.write(120); delay(1000); // Wait for 1000 millisecond(s) servo_12.write(0); delay(1000); // Wait for 1000 millisecond(s) }}
void loop(){ delay(10); // Delay a little bit to improve simulation performance}