-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Cannot use UART0/UART1/UART2 concurrently on ESP32 using Arduino IDE #1314
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
That issue explains it fairly well. tldr is, use Serial0 and 1 for your duplex devices and serial2 for your debug messages. |
I need link for that library you use . |
HardwareSerial is part of arduino-esp32 core. |
when i include it to my program it is not be declared !! |
Then you have a problem with your installation. It is in core, you don't even need to include it. |
Should it be ?
|
https://quadmeup.com/arduino-esp32-and-3-hardware-serial-ports/ include <HardwareSerial.h> HardwareSerial MySerial(1); void setup() { void loop() {
} |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
I cannot even view anything on my serial monitor. Here is the code below. #include "HardwareSerial.h" PMS pms(Serial); void setup() } void loop(){
{
} |
@KrisUAV, I'm also using this PMS library for pms9003m and having the same issue as yours, it works perfectly alone but when i combine the code with the code that connects to mosquitto broker via sim800, I not getting any reading from that sensor, but the sim800 is working without any issue. I'm using the Ttgo tcall sim800l for my proto. |
In a video I saw that we can configure any pin as uart RX and TX, all you need to do is go to the hardware serial.cpp and change pins. But unfortunately that also didn't work. Are all these uart pins multiplexed to a single uart buffer?! |
is there any way to use esp 32 GPIO pins as RX and TX in esp32? |
Hardware:
Board: ESP-WROOM-32
Core Installation/update date: 11/jul/2017
IDE name: Arduino IDE
Flash Frequency: 80Mhz
Upload Speed: 115200
Description:
Hi everyone,
I am working on a project in which I need to have an ESP32 connected via serial to another ESP32 and at the same time to a Nextion HMI. I also need to communicate from the central ESP32 to these 2 devices concurrently ( having the serial communications in the "central" ESP32 open to both devices and issuing commands simultaneously)
I have been making some testing in preparation to the interfacing to these devices by replacing the Nextion with an ESP826MOD:
Central ESP32: ESP-WROOM-32 devkit, connected to a USB port of a PC
Client Device A: ESP-WROOM-32 devkit connected to USB port of another PC
Client Device B: ESP8266MOD devkit connected to a USB port of the same PC as Central ESP32
I load a simple sketch (Based on serial passthrough example by Erik Nyquist) on the central ESP32 to open UART1 and UART2. The idea is to open the Serial Monitor connected via the USB port to each device and issue simple strings, which I expect reflected on any of the other Serial Monitors from A and B.
For devices A and B, I setup UART1 for the ESP8266MOD (Device B - TX/RX pins) and UART2 on the 2nd ESP32 (Device A - pins 16 & 17). I then proceed with the following sketches (Based on serial passthrough example by Erik Nyquist):
Sketch:
In summary, I can type any text from Serial monitor of Devices A and B and I will see it on Serial Monitor of Central ESP32, but if I type something on Serial Mon of Central ESP32 I never see anything on Device B and only garbled text on Device A.
I have tried several configurations to no avail. My question is: does anybody knows if an updated library or firmware is available for the ESP32, or some sort of workaround to overcome this issue?
Can somebody point me out in the right direction to be able to use the 3 UARTs concurrently? it is very urgent/critical for me so any idea is welcome.
Thanks in advance
-EZ
The text was updated successfully, but these errors were encountered: