Skip to content

Commit 1320c7f

Browse files
committed
Corrected the comments and made comments indented for easy understanding
1 parent 9d442f5 commit 1320c7f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

examples/Wiper/Wiper.ino

+7-7
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,21 @@ void setup()
2828

2929
void 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

0 commit comments

Comments
 (0)