// Taller "Servomotor Giro Restringido"
// Servomotor sweep
// ArduinoIDE-Rpi
// by LabTec
#include <Servo.h>
Servo servo1;
void setup() {
servo1.attach(21);
}
void loop() {
for (int pos = 0; pos < 180; pos++) {
servo1.write(pos);
delay(10);
}
for (int pos = 180; pos > 0; pos--) {
servo1.write(pos);
delay(10);
}
}