Compare commits
No commits in common. "8fede6107b155e3cba9cdc1f2099882a2f4526d0" and "c2439c8fa1afa4c12dbc8cecefee825c6946e5ee" have entirely different histories.
8fede6107b
...
c2439c8fa1
|
@ -16,7 +16,9 @@ int pos = 0; // variable to store the servo position
|
|||
|
||||
void setup() {
|
||||
myservo.attach(9); // attaches the servo on pin 9 to the servo object
|
||||
}
|
||||
|
||||
void loop() {
|
||||
for (pos = 70; pos <= 130; pos += 1) { // goes from 0 degrees to 180 degrees
|
||||
// in steps of 1 degree
|
||||
myservo.write(pos); // tell servo to go to position in variable 'pos'
|
||||
|
@ -27,7 +29,3 @@ void setup() {
|
|||
delay(15); // waits 15ms for the servo to reach the position
|
||||
}
|
||||
}
|
||||
|
||||
void loop() {
|
||||
delay(1000);
|
||||
}
|
Loading…
Reference in New Issue