UART issues with ESP32 Module

Trying to get the embedded UART element to work with the ESP32 WROOM Module but can not get anything out on UART1 or UART.2. I’m just trying send out “Hello World” through the UART.
I am looking at the IO pins 4,12,14 for output but also checked 5, 13, and 15 and see no output.
If I send the string out on UART 3 it is present on IO1 but that is the UART programming port.

Any help would be appreciated!

Hi,

Can you attach your .atmo file? I can take a look and see if anything is going wrong.

I’ve attached an .atmo that’s designed to run the ESP32 dev kit C that demonstrates the UART element. GpioReadBLE.atmo (26.2 KB)

-Nick

There appears to be a disconnect between the UART naming and the pin assignments commonly used by ESP32 users in the Arduino renvironment (see https://components101.com/microcontrollers/esp32-devkitc for example) and under Atmosphere (per https://developer.atmosphereiot.com/documents/hardwareselection/esp32.html)

Specifically, what Atmosphere calls UART3 is the default “console” UART that connects to the USB-UART interface on DevKitC – that’s typically described as UART0 in Arduino, and is U0TXD/U0RXD per the Espressif’s hardware design details.

It took me a few hours of head scratching before I gave up for the day – it was only when I woke up the next day that I realized I needed to go back and re-read Atmosphere’s device details page for the ESP32 — I read it originally, but wasn’t focused on the UART detail at the time, so I had not noticed the mismatch in UART assignments.

Once I figured this out, I was able to get the UART Loopback demo working; and more importantly, was able to additionally use “UART1” (Atmosphere defined as IO4 and IO5).

It may be very helpful to newcomers to Atmosphere if there was a short-cut link from the studio to the device details page, and especially to the table of IO mappings as things are sufficiently different from more widely used conventions.

I just noticed that the ESP32 and the DevKitC pages (as I write this on 2019-11-28) incorrectly states that “UART1” is the USB Debug port, mapped to IO4 and IO5.

But that should actually be TXD0/RXD0 which is IO1 and IO3, located between IO21 and IO22 as can be seen in the official ESP32 Dev Kit C schematic PDF downloaded from Esspressif.

Hmmm, I may have spoken too soon about the UART loopback demo working – the transmit out from ESP32 UART1 (GPIO4/GPIO5) works – but now that I went back to play with it some more, I discovered that when sending data to the ESP32, it dies!

This behavior happens with UART1 and also with UART3 (USB serial). (I haven’t tried UART2 because I can’t easily get to those pins the way things are set up at the moment.)

This happens with the “stock” UART loopback example project, compiled and then downloaded without modifications. :frowning: