void setup() {
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 1) {
char key = Serial.read();
int val = Serial.parseInt();
switch (key) {
case 'b': Serial.println(val);
break;
case 'c': Serial.println(val);
break;
}
}
}