File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
build/shared/examples/10.StarterKit/p02_SpaceshipInterface Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -44,15 +44,15 @@ void loop(){
4444 switchstate = digitalRead (2 );
4545
4646 // if the button is not pressed
47- // blink the red LEDs
47+ // turn on the green LED and off the red LEDs
4848 if (switchstate == LOW) {
4949 digitalWrite (3 , HIGH); // turn the green LED on pin 3 on
5050 digitalWrite (4 , LOW); // turn the red LED on pin 4 off
5151 digitalWrite (5 , LOW); // turn the red LED on pin 5 off
5252 }
5353 // this else is part of the above if() statement.
5454 // 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
5656 else {
5757 digitalWrite (3 , LOW); // turn the green LED on pin 3 off
5858 digitalWrite (4 , LOW); // turn the red LED on pin 4 off
You can’t perform that action at this time.
0 commit comments