Wemos D1: Unable to use RX/TX pins (for hardware serial)

hobby_guy
Posts: 20
Joined: Sat Jan 29, 2022 3:29 pm

Wemos D1: Unable to use RX/TX pins (for hardware serial)

Postby hobby_guy » Sun Feb 25, 2024 3:27 pm

I'm unable to use the RX and TX pins on my Wemos D1 Mini (marked "MIN132") dev board for serial communications with a PC. I've configured standard hardware serial communications in the sketch, as shown below, which works perfectly if I connect the Wemos to the PC via the USB plug. However, I can't use the RX/TX pins, and I've tried

1) with a USB connection plugged in (for power),
2) no USB connected, and 5V power through the VCC pin

Nothing happens on the PC, in the terminal software, unless serial is taken through the USB port. Since the RX/TX pins are broken out I would expect the idea is that it should be possible to use them as an alternative to serial through the USB port?

Image

Code: Select all


void setup() {
	Serial.begin(115200);
	Serial.println("Hello world");
}

void loop() {

}

hobby_guy
Posts: 20
Joined: Sat Jan 29, 2022 3:29 pm

Re: Wemos D1: Unable to use RX/TX pins (for hardware serial)

Postby hobby_guy » Sun Feb 25, 2024 3:43 pm

The pins I've tried to use, are RX/TX also marked "UART0" in the pinout image. Maybe I should use UART1 (or even UART2), as described here: https://www.luisllamas.es/en/esp32-uart/ ??

Just to emphasize: The aim here is to be able to do any serial comms (preferrably, hardware serial over "soft"/virtual serial) when not powering the ESP through USB. I'm trying to get battery power working, and I'd still need to be able to see what's going on (through serial).

JoeSensoric
Posts: 29
Joined: Fri Mar 03, 2017 10:31 am

Re: Wemos D1: Unable to use RX/TX pins (for hardware serial)

Postby JoeSensoric » Mon Mar 11, 2024 10:27 am

How do you connect serial to the PC?
Have you connected RX to TX in both directions?

Who is online

Users browsing this forum: No registered users and 120 guests