Skip to content

Instantly share code, notes, and snippets.

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