T-PicoC3 trying communication between RP2040 and ESP32 #9212
-
Hi, I just received my new T-PicoC3 board, and I'm discovering Micropython as well. Basically, the idea is to use a UART communication. But, I'm not sure how to code them on both processors.
It seems that rx, tx, rts, cts arguments must be numbers and not Pin. When I run this code, it takes around 15s before I get the 'ok' message on Thonny's console. It's weird, because if I type them in the console, I get the message almost immediately...
It's a little longer, because this processor can address the LED and the display (the ESP32 cannot as far as I know). When the board boots, I see the LED blink, then the display becomes blus and the "Waiting..." message appears on it. Then the screen goes green, the LED switches on meaning that something arrives in the UART, but nothing happens after that. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 10 replies
-
From this discussion, it seems that I have to use different pin numbers for UART1:
So I changed in both files. On the ESP32's side: |
Beta Was this translation helpful? Give feedback.
-
For those who would like to use the UART communication between the two processors, here is what I did: ESP32 side:
RP2040 side:
To read data from the UART:
It seems that higher baudrates do not work. |
Beta Was this translation helpful? Give feedback.
From this discussion, it seems that I have to use different pin numbers for UART1:
So I changed in both files. On the ESP32's side:
RP2040 = UART(1, baudrate=9600, tx=5, rx=4, cts=7, rts=6, txbuf=1024, rxbuf=1024)
and on the RP2040's side:
ESP32 = UART(1, baudrate=9600, tx=Pin(4), rx=Pin(5), cts=Pin(6), rts=Pin(7), txbuf=1024, rxbuf=1024)
(crossing rx/tx and cts/rts) but it's still not working... The display remains blue, with the "Waiting..." message.