Created
July 8, 2019 05:47
-
-
Save surinoel/27fa998ff605a36231f4d48f267d3088 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
void setup() { | |
// put your setup code here, to run once: | |
Serial.begin(115200); | |
pinMode(13, OUTPUT); | |
} | |
void loop() { | |
} | |
void serialEvent(void) | |
{ | |
char data; | |
data = Serial.read(); | |
if(data == 'o') { | |
digitalWrite(13, 1); | |
} | |
else if(data == 'x') { | |
digitalWrite(13, 0); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment