Skip to content

Instantly share code, notes, and snippets.

@sweemeng
Created August 12, 2010 14:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sweemeng/521059 to your computer and use it in GitHub Desktop.
Save sweemeng/521059 to your computer and use it in GitHub Desktop.
int incomingByte = 0;
int ledPin = 13;
void setup(){
Serial.begin(9600);
pinMode(ledPin,OUTPUT);
}
void loop(){
if(Serial.available() > 0){
incomingByte = Serial.read();
if(incomingByte == 116){
Serial.println("Blinky");
digitalWrite(ledPin,HIGH);
delay(1000);
digitalWrite(ledPin,LOW);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment