baudrate 115200
sendstring="Something"
[loop]
cls
wprint "Sending "
wprint sendstring
wprint ", "
wprint "Receiving "
receivestring="Nothing"
serialprintln sendstring
serialbranch [serialin]
wprint receivestring
wprint "<BR>"
timer 2000,[loop]
wait
[serialin]
serialinput receivestring
return
when the appropriate changes are made to use the second port, it does not work.
serial2begin 115200, 4, 5
sendstring="Something"
[loop]
cls
wprint "Sending "
wprint sendstring
wprint ", "
wprint "Receiving "
receivestring="Nothing"
serial2println sendstring
serial2branch [serial2in]
wprint receivestring
wprint "<BR>"
timer 2000,[loop]
wait
[serial2in]
serial2input receivestring
return
When a loopback jumper is used, it should receive what was sent "Something" , however it will print "Nothing" (the default when no serial is received.) I've looked at the pins with a scope and it is coming out TX and going in RX.