![]() I am using PlatformIO, ESP32 WROVER (I tried WEMOS LOLIN and LILYGO versions), Arduino core (if that's how you call that). So for now things will work for me as is, but i found it strange that I was not able to remap the pins for a 100 percent. I am not familiar with that particular sensor but I've had similar issues. I could edit the Hardwareserial.cpp to change the pins there or opt for Softwareserial but that should not really be necessary. 1 Answer Sorted by: 0 I think you need to include a hard reset of the sensor when the ESP32 restarts. Some development boards have the USB-to-UART bridge installed. Including the Hardwareserial.h library did not change things. Establishing a serial connection with the ESP32 target device could be done using a USB-to-UART bridge. I did try a barebones sketch with no other functionality in it with the same result. Also I am doing this by straight serial comms, no library is used. You can just use one of them: Serial0: RX0 on GPIO3, TX0 on GPIO1 Serial1: RX1 on GPIO9, TX1 on GPIO10 (+CTS1 and RTS1) Serial2: RX2 on GPIO16, TX2 on GPIO17 (+CTS2 and RTS2) You don't need the Software Serial Port, since the ESP32 can unconfigurate internally the Serial port pin to other pins. I also tried different pins since I know that some are not really available but no change.Īll I am doing is sending values to the display, not vice-versa. In this video I go through the serial ports provided on the ESP32 and outline how to set them up and how to connect serial devices. include define GPSSERIALNUM 1 define GPSRXPIN 34 define GPSTXPIN 12 HardwareSerial GPSSerial(GPSSERIALNUM) void setup(). 9 The ESP32 has 3 different Serial Ports (UART).I tried the same with serial2, same result. It has been modeled from the ESP32 Arduino cores HardwareSerial class, but takes no input streams from the user. So I tried to remap using Serial1.begin(9600, SERIAL_8N1, 26, 27) in the setup.Īfter some fussing about I discovered by chance that with the TX on pin 27 and the RX on the default ESP RX pin, it did work.įurther fussing about resulted in the conclusion that the RX connection can be connected to pin0, default RX and strangely enough also the default TX pin. ![]() The ESP32 has 3 uarts so that should not be a problem, the only thing is that on my particular ESP's only one uart is broken out to the devboard pins. With the display connected the upload would fail. Yhe Serial Monitor on PC receives the data and display it. In doing so I would not have to disconnect the RX and TX pins while uploading a new sketch. It is designed for two purposes: ESP32 PC: Your code on ESP32 send data via Serial. Maybe someone has encountered this before, i did search online but did not find any similar cases.įor my weather station with a Nextion display I wanted the display to be connected to a different serial port than the default port. ![]()
0 Comments
Leave a Reply. |