Create a gist now

Instantly share code, notes, and snippets.

void setup(){
pinMode(13, OUTPUT);
Serial.begin(9600);
}
void loop(){
char input[30];
int inputchar;
inputchar = Serial.read();
if(inputchar != -1 ){
if(inputchar == 'a'){
for(int i=0;i<5;i++){
digitalWrite(13, HIGH);
delay(250);
digitalWrite(13,LOW);
delay(250);
}
}else if(inputchar == 'w'){
digitalWrite(13, HIGH);
delay(1250);
digitalWrite(13,LOW);
}
}
else {
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment