Plasma2040 UART?

Playing with the Plasma2040 for the first time. Looks great, but … it seems none of the exposed connections support the Pico UARTs. I’d like to connect a serial device (an ESP-01 to give me Wifi) but can’t find any suitable connnections.

Is this posible?

Thanks

Richard

Hi, I’d also like to know if there’s a way i can get UART working with Plasma2040. either using a peripheral or connecting straight to the board.

I have seen this link Plasma 2040 UART RX TX Possible? · Issue #216 · pimoroni/pimoroni-pico · GitHub

But with this:

uart = UART(0, baudrate=9600, tx=Pin(20), rx=Pin(21), timeout=1)

I get this:

%Run -c $EDITOR_CONTENT
MPY: soft reboot
Traceback (most recent call last):
File "", line 11, in
ValueError: bad TX pin

Hi

None of the pins exposed on the Plasma2040 support support UART. My use case was to control the LED output from wifi using an esp-01, and I came up with these solutions:

  1. Use PIO for UART and connect the ESP-01, or
  2. Use an I2C to UART adapter and connect the ESP-01 to the adpater

Both worked but my final and best solution was to use a Pico W connected to the Plasma2040 via I2C (the Plasma2040 acting as an i2c device). Simplest and best overall.

1 Like

The schematic for Plasma 2040 is a bit vague, but it implies that the I2C0 GPIO20/21 pins are broken out, and those support UART bus 1. Try the I2C pins on the side of the board, or the pins on the Qwiic/StemmaQT connector. You might be able to use JST-SH breakout cables to access these.

@Joshy-J

uart = UART(0, baudrate=9600, tx=Pin(20), rx=Pin(21), timeout=1)

You might need to switch that to UART 1, which I think should look like this:

uart = UART(1, baudrate=9600, tx=Pin(20), rx=Pin(21), timeout=1)

That’s interesting. The pinout diagrams from Raspberry pi don’t show UART on GPIO 20 and 21, though this is mentioned in the 2040 datasheet.

Oh, you’re right, I hadn’t noticed that. I was actually working from https://pico.pinout.xyz/ . I wonder if that’s a mistake in the Pico (W) datasheet then?

Just tested, GPIO 20 and 21 do support uart1.

Did you use UART1? Any other tips?

uart = UART(1, baudrate=9600, tx=Pin(20), rx=Pin(21), timeout=1)

I tested using the stdio package in the SDK:

stdio_uart_init_full(uart1, 115200, 20, 21);

what device are you communicating with? Most uarts will be set to 115200 baud initially.