gharryh:
The result now is that the display shows <255> and then freezes
Well, that is some progress, but I still think it is because you need to null terminate what you are sending to the serLCD.print routine. Though 255 is a bit odd. There isn't anything holding the Rx pin (pin 0) high is there?
When i typein 1234567890 the result in the display becomes <141>
AT least that means that the switch statement works as expected.
So the main problem seems to me the communication
CAn you try this one, does it echo the characters you type in (after enter)
It returns nothing, but strangly using that same connection i can program the duo.
Also tested it on a nano with the same result.
As this is a simple echo program the Serial monitor should see the very same characters back.
The fact that that not works makes me wonder if the serial works OK.
Thereis something strange happening.
Using the IDE serial monitor nothing is returned, even a extra Serial.print("Hello World"); in the setup.
As both Deumilanov and the Nane had the same results i tried it with a seperate terminal program.
Hoera success sending 123 returned 495051
Is it possible that the IDE monitor doesnt change to the programmed 9600 baud.
So lets try it by changing the baudrate in the sketch to 115200 and yes the sketch returns the input now.
The question know is this normal or a fault in de IDE or my computer.
So i recompiled my first sketch again with a baudrate 115200 and the sketch works.
Lost a day finding out som strange behaivior of the IDE or ditnt i read the docs full?