Created
March 31, 2017 09:01
-
-
Save UserAd/dd4105cc3f3759794fc16d3ded2c1cf5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
int result = 0; | |
void loop() { | |
char key = kpd.getKey(); | |
if(key) // Check for a valid key. | |
{ | |
switch (key) | |
{ | |
case '*': | |
result = 0; | |
break; | |
case '#': | |
result = 0; | |
break; | |
default: | |
result = result * 10 + toInt(key) | |
Serial.println(result); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment