Skip to content

Instantly share code, notes, and snippets.

@michaelsarduino
Created September 13, 2015 10:42
Show Gist options
  • Save michaelsarduino/581b29b107f7268c1ccb to your computer and use it in GitHub Desktop.
Save michaelsarduino/581b29b107f7268c1ccb to your computer and use it in GitHub Desktop.
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
void loop() {
if(Serial.available() > 0)
{
int status_led = Serial.read();
if(status_led == 49)
{
digitalWrite(13, HIGH);
}
if(status_led == 48)
{
digitalWrite(13, LOW);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment