Last active
March 7, 2016 20:29
-
-
Save nilsonpessim/9193244 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
int led = 13; | |
void setup(){ | |
Serial.begin(9600); | |
pinMode(led,OUTPUT); | |
} | |
void loop(){ | |
char caracter = Serial.read(); | |
if (caracter == '1') { | |
digitalWrite(led,HIGH); | |
} | |
if (caracter == '2') { | |
digitalWrite(led,LOW); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment