void loop(){
if (Serial.available()>1){ // 2 characters came in?
digit1 = Serial.read() - 48; // read & convert to decimal, '0' to '9' expected
digit2 = Serial.read() - 48;
total = (digit1 *10) + digit2; // maybe swap these 2, result is 0 to 99
switch(total){
case 0:
:
break;
:
:
case 99:
:
:
break;
} // end switch
} // end serial checl
} // end loop
if (Serial.available()>1){ // 2 characters came in?
digit1 = Serial.read() - 48; // read & convert to decimal, '0' to '9' expected
digit2 = Serial.read() - 48;
total = (digit1 *10) + digit2; // maybe swap these 2, result is 0 to 99
switch(total){
case 0:
:
break;
:
:
case 99:
:
:
break;
} // end switch
} // end serial checl
} // end loop