File tree 1 file changed +2
-2
lines changed
build/shared/examples/10.StarterKit/p02_SpaceshipInterface 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ void loop(){
44
44
switchstate = digitalRead (2 );
45
45
46
46
// if the button is not pressed
47
- // blink the red LEDs
47
+ // turn on the green LED and off the red LEDs
48
48
if (switchstate == LOW) {
49
49
digitalWrite (3 , HIGH); // turn the green LED on pin 3 on
50
50
digitalWrite (4 , LOW); // turn the red LED on pin 4 off
51
51
digitalWrite (5 , LOW); // turn the red LED on pin 5 off
52
52
}
53
53
// this else is part of the above if() statement.
54
54
// if the switch is not LOW (the button is pressed)
55
- // the code below will run
55
+ // turn off the green LED and blink alternatively the red LEDs
56
56
else {
57
57
digitalWrite (3 , LOW); // turn the green LED on pin 3 off
58
58
digitalWrite (4 , LOW); // turn the red LED on pin 4 off
You can’t perform that action at this time.
0 commit comments