Ive been using ESP for a few small proijects (WiFi based)
Serial.print() etc work fine, but I recently wanted to use local commands with Serial.read()
BUT !
The code compiles normally - the program runs the other stuff normally (Blynk based), but no code inside the Serial.available() block runs when I send chars to the USB port.
Any thoughts?
Serial.begin();
:::
if (Serial.available()) {
Serial.print('.'); // <--- to see if anything arrives - NO JOY AT ALL ?!
char c = Serial.read(); // only recognise lower-case chars
switch (tolower(c)) {
:::
}
}
Before the 'not just a snippet' request arrives - Serial.begin() is up top, the bitrate is set correctly, and Serial.prints work fine.