Created
June 30, 2018 20:41
-
-
Save nkenna/7a107fa28b57420e393e76abd9034a30 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 loop() | |
{ | |
Serial.println("steinacoz.com"); | |
if (Serial.available()) | |
{ | |
move(Serial.read() - '0'); | |
} | |
delay(1000); | |
} | |
void move(int n) | |
{ | |
if(n == 1){ | |
up(); | |
} | |
else if (n == 2){ | |
down(); | |
} | |
else if (n == 3){ | |
rite(); | |
} | |
else if (n == 4){ | |
left(); | |
} | |
else if (n == 5){ | |
irri(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment