I have designed a test board to understand ESP32-S3 working pins. I am using USB interface D+, D- for programing so Serial0 is free to use.
This is my test circuit for testing an RS485 converter. For the test, I am using an MD02 temperature and humidity sensor. Also for the converter I am using this module
This code is not working on Serial0 despite Rx and Tx LEDs are blinking on the RS485 converter.
#include <HardwareSerial.h>
void setup() {
// put your setup code here, to run once:
Serial0.begin(9600, SERIAL_8N2, 44, 43);
Serial.begin(115200);
}
void loop() {
Serial0.write("READ");
delay(3000);
Serial.print("Temp ve NEM: ");
while (Serial0.available() > 0) {
Serial.print(char(Serial0.read()));
}
Serial.println(".");
}
This is working
#include <HardwareSerial.h>
void setup() {
// put your setup code here, to run once:
Serial1.begin(9600, SERIAL_8N2, 18, 17);
Serial.begin(115200);
}
void loop() {
Serial1.write("READ");
delay(3000);
Serial.print("Temp ve NEM: ");
while (Serial1.available() > 0) {
Serial.print(char(Serial1.read()));
}
Serial.println(".");
}
What should I do differently for Serial0 and RS485?, because the 6M NEO GPS module is working properly on Serial0.
