Created
June 30, 2016 23:52
-
-
Save taesamja/a850721529fbdbbacd3fc157a5569d19 to your computer and use it in GitHub Desktop.
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
const int ledPin = 13; | |
char indata; | |
void setup() { | |
Serial.begin(9600); | |
pinMode(ledPin, OUTPUT); | |
} | |
void loop() { | |
if(Serial.available()) { | |
indata = Serial.read(); | |
if(indata== 'H') { | |
digitalWrite(ledPin, HIGH); | |
} | |
if(indata== 'L') { | |
digitalWrite(ledPin, LOW); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment