UART not working with today's version of micropython
Re: UART not working with today's version of micropython
Thank you very much, I will try that.
Re: UART not working with today's version of micropython
No that hasn't solved the problem.
I set the txBuf to 32 but the nextion still receives double digits.
when I send out json to the esp32 it does this:
{"sessionid":"0_4_1618493902","staarrttTT""::117755778844,,""eennddTT""::118855779977,,""ssttaarrttDD""::223344662222,,""eennddDD""::225500997722,,""aavvggHHRR""::00}}
so for 32 chars it works as expected and after that every character is doubled.
I set the txBuf to 32 but the nextion still receives double digits.
when I send out json to the esp32 it does this:
{"sessionid":"0_4_1618493902","staarrttTT""::117755778844,,""eennddTT""::118855779977,,""ssttaarrttDD""::223344662222,,""eennddDD""::225500997722,,""aavvggHHRR""::00}}
so for 32 chars it works as expected and after that every character is doubled.
Re: UART not working with today's version of micropython
Changing the txbuf doesn't change the behaviour.
Re: UART not working with today's version of micropython
I cannot replicate that behavior. I have set the UART to 9600 baud, txbuf to 32, and get the proper message, received by a USB/UART bridge:
{"sessionid":"0_4_1618493902","startT":175784,"endT":185797,"startD":234622,"endD":250972,"avgHR":0}
Which firmware version are you using? Type Ctrl-B to get it.
Edit: Looking at it with a logic analyzer shows not problems either.
{"sessionid":"0_4_1618493902","startT":175784,"endT":185797,"startD":234622,"endD":250972,"avgHR":0}
Which firmware version are you using? Type Ctrl-B to get it.
Edit: Looking at it with a logic analyzer shows not problems either.
Re: UART not working with today's version of micropython
What happens if you set timeout_char=10?
Edit: What is the UART setting for writing to the nextion display?
Edit2: Do you use both UARTs at the same time?
Edit: What is the UART setting for writing to the nextion display?
Edit2: Do you use both UARTs at the same time?
Re: UART not working with today's version of micropython
The same thing happens.
UART(1, baudrate=115200, bits=8, parity=None, stop=1, tx=4, rx=5, timeout=10, timeout_char=10, txbuf=32)
I am using this version today:
rp2-pico-20210415-unstable-v1.14-170-ga9bbf7083
(the ctrl-b thing doesn't work for me in thonny? )
Re: UART not working with today's version of micropython
Shouldn't it be:
UART(1, baudrate=115200, bits=8, parity=None, stop=1, tx=Pin(4), rx=Pin(5), timeout=10, timeout_char=10, txbuf=32)
UART(1, baudrate=115200, bits=8, parity=None, stop=1, tx=Pin(4), rx=Pin(5), timeout=10, timeout_char=10, txbuf=32)
Re: UART not working with today's version of micropython
Yes sorry, that is what happens, but it is constructed in different classes so I copy pasted some there (badly, apologies for that).
This is what it reports when I print(self.uart):
UART(1, baudrate=115200, bits=8, parity=None, stop=1, tx=4, rx=5, txbuf=32, rxbuf=256, timeout=10, timeout_char=10, invert=None)
Re: UART not working with today's version of micropython
No worries. I just wanted to be sure. And the report of the UART setting could indeed reflect the way it is set.
But still I cannot replicate that, even if I send at two lines. Do you have the option to connect a logic analyzer, or just a UART/USB bridge to a PC for verification, that indeed double characters are sent.
But still I cannot replicate that, even if I send at two lines. Do you have the option to connect a logic analyzer, or just a UART/USB bridge to a PC for verification, that indeed double characters are sent.