Created
December 25, 2015 13:51
-
-
Save tkzw21/728c34c48b04d2810c7b 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
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