// readOneChar.ino // Reads one char cmds from Serial // https://www.forward.com.au/pfod/ArduinoProgramming/SoftwareSolutions/index.html // Pros: Extremely Simple, Non-blocking and Robust // Cons: Nothing really. You can do a lot with one char cmds (A..Z,a..z,0..9) plus symbols void setup() { Serial.begin(9600); for (int i = 10; i > 0; i--) { Serial.print(' '); Serial.print(i); delay(500); } Serial.println(); } void loop() { int c = Serial.read(); // note read() returns an int if (c != -1) { // read() return -1 if there is nothing to be read. // got a char handle it Serial.println((char)c); // need to cast to char c to print it otherwise you get a number instead } }