Created
June 6, 2018 01:13
-
-
Save gallaugher/167f7b42f7f4c81ca3dbe22911bfeb6a to your computer and use it in GitHub Desktop.
Day 12, Learning By Doing 5 - BONUS while
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
byte BUTTON_PIN = 7; | |
byte LED_PIN = 6; | |
byte buttonState = 0; | |
void setup() { | |
// put your setup code here, to run once: | |
pinMode(BUTTON_PIN, INPUT); | |
pinMode(LED_PIN, OUTPUT); | |
} | |
void loop() { | |
// put your main code here, to run repeatedly: | |
while (digitalRead(BUTTON_PIN) == HIGH) { | |
digitalWrite(LED_PIN, HIGH); | |
} | |
digitalWrite(LED_PIN, LOW); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment