#include Servo servo; int pin = 28; void setup() { servo.attach(pin); } void loop() { for (int pos = 0; pos <= 90; pos += 1) { servo.write(pos); delay(15); } for (int pos = 90; pos >= 0; pos -= 1) { servo.write(pos); delay(15); } }