Created
April 3, 2015 23:44
-
-
Save rockos/c7532f1938fa2b720c52 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
#define MAX_DIGIT 3 | |
int readData() { | |
char c[MAX_DIGIT] = "0"; | |
for (int i = 0; i < MAX_DIGIT; i++ ) { | |
c[i] = Serial.read(); | |
if (c[i] =='¥0') | |
break; | |
} | |
return atoi(c); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment