summaryrefslogtreecommitdiff
path: root/user-code/servo/arduino-old/servo-reverse/servo-reverse.ino
blob: 8003a077fbe63a94bf6a91fd2f479a7bd6a7db58 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#include <Servo.h> 
Servo myservo;  // create servo object to control a servo 
void setup() { 
  myservo.attach(9); // attach the servo object on to pin 9 
  myservo.write(90); // tell servo to rotate by 90 degrees
  delay(1000);
  myservo.write(45);
  delay(1000);
  myservo.detach();
}  
void loop() {
}