File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ void setup()
2323 myservo.attach (9 ); // attaches the servo on pin 9 to the servo object
2424 pinMode (button_pin, INPUT_PULLUP); // declares the pin as digital input
2525 myservo.write (startpos); // Initialize the servo wiper to start angle
26- pinMode (13 , OUTPUT);
26+ pinMode (LED_BUILTIN , OUTPUT); // to show the state of servo wiper
2727}
2828
2929void loop ()
@@ -33,7 +33,7 @@ void loop()
3333 if (digitalRead (button_pin) == LOW) // Start the servo if the button is pressed and complete the
3434 // entire rotation regardless of button state later
3535 {
36- digitalWrite (13 , HIGH); // status that wiper servo is activated
36+ digitalWrite (LED_BUILTIN , HIGH); // status that wiper servo is activated
3737 for (int pos = startpos; pos <= endpos; pos += 1 ) // goes from starting angle to end angle in steps of 1 degree
3838 {
3939 myservo.write (pos); // tell servo to go to position in variable 'pos'
@@ -45,5 +45,5 @@ void loop()
4545 delay (5 ); // waits 15ms for the servo to reach the position
4646 }
4747 }
48- digitalWrite (13 , LOW); // status that wiper servo has stopped
48+ digitalWrite (LED_BUILTIN , LOW); // status that wiper servo has stopped
4949}
You can’t perform that action at this time.
0 commit comments