First time working with the ESP32 and interfacing with RS485.
I'm using this shield with a M3485 chip.
https://www.electrodragon.com/product/e ... ce-shield/
For now, I'm just trying to receive data over the RS485 interface and echo it to the serial monitor.
Code: Select all
#define TXD 17
#define RXD 16
void setup() {
// initialize both serial ports:
Serial.begin(115200);
Serial2.begin(19200, SERIAL_8N1, RXD, TXD);
}
void loop() {
// read from port 1, send to port 0:
if (Serial2.available()) {
inByte = Serial2.read();
Serial.print(inByte, HEX);
}
}
The activity on the GPIO16 input looks like it's active low for some reason.
Any tips on getting this working? Is this the right place to ask the question?
Thanks!