File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -28,21 +28,21 @@ void setup()
2828
2929void loop ()
3030{
31- // The button_pin is declared as INPUT_PULLUP which means switch logic is inverted.
32- // It gives LOW when the switch is pressed and HIGH when it is open
33- if (digitalRead (button_pin) == LOW) // Start the servo if the button is pressed and complete the
34- // entire rotation regardless of button state later
31+ // The button_pin is declared as INPUT_PULLUP which means switch logic is inverted.
32+ // It gives LOW when the switch is pressed and HIGH when it is open
33+ if (digitalRead (button_pin) == LOW) // Start the servo if the button is pressed and complete the
34+ // entire rotation regardless of button state later
3535 {
36- digitalWrite (LED_BUILTIN, 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'
40- delay (5 ); // waits 15ms for the servo to reach the position
40+ delay (5 ); // waits for the servo to reach the position
4141 }
4242 for (int pos = endpos; pos >= startpos; pos -= 1 ) // goes from end angle to start angle again
4343 {
4444 myservo.write (pos); // tell servo to go to position in variable 'pos'
45- delay (5 ); // waits 15ms for the servo to reach the position
45+ delay (5 ); // waits for the servo to reach the position
4646 }
4747 }
4848 digitalWrite (LED_BUILTIN, LOW); // status that wiper servo has stopped
You can’t perform that action at this time.
0 commit comments