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()
23
23
myservo.attach (9 ); // attaches the servo on pin 9 to the servo object
24
24
pinMode (button_pin, INPUT_PULLUP); // declares the pin as digital input
25
25
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
27
27
}
28
28
29
29
void loop ()
@@ -33,7 +33,7 @@ void loop()
33
33
if (digitalRead (button_pin) == LOW) // Start the servo if the button is pressed and complete the
34
34
// entire rotation regardless of button state later
35
35
{
36
- digitalWrite (13 , HIGH); // status that wiper servo is activated
36
+ digitalWrite (LED_BUILTIN , HIGH); // status that wiper servo is activated
37
37
for (int pos = startpos; pos <= endpos; pos += 1 ) // goes from starting angle to end angle in steps of 1 degree
38
38
{
39
39
myservo.write (pos); // tell servo to go to position in variable 'pos'
@@ -45,5 +45,5 @@ void loop()
45
45
delay (5 ); // waits 15ms for the servo to reach the position
46
46
}
47
47
}
48
- digitalWrite (13 , LOW); // status that wiper servo has stopped
48
+ digitalWrite (LED_BUILTIN , LOW); // status that wiper servo has stopped
49
49
}
You can’t perform that action at this time.
0 commit comments