Here is the sketch:
// compiles OK with IDE 1.8.12, but does not work with ESP32 dev board (set to defaults) or with a UNO
// expected to print "Send lower case a, b,c,...m" to serial monitor using function in the loop
void setup() // ******************************************************* start of setup
{
Serial.begin(9600); // does not work at other baud rates or other serial ports or serial cables
Serial.println("ready"); // just to let humans know that * something * has happened
//Serial.println("Send lower case a, b,c,...m"); // prints as expected here
}
void loop() // ******************************************************* start of loop
{
test;
}
void test() // changing the name does not change the outcome
{
Serial.println("Send lower case a, b,c,...m"); // sometimes prints ?⸮V⸮⸮5 or usually prints nothing
Serial.print("print"); // prints nothing
//Serial.write("write"); // compile error processing.app.SerialException: Error opening serial port 'COM6'
delay(500); // various delays do not change the outcome - nothing printed in the loop
}
Any and all help or suggestions are appreciated, thanks.