Thank you in advance for your help. I am trying to communicate the PLC (ESP32 38AR) to an external device using TTL. It didn't work, and I wanted to check if there was something wrong with the TTL.
With the switch in the "0 Zone" configured according to the manual: 1: OFF, 2: ON, 3:ON, 4:OFF, the PLC powered with 24V and this test code:
void setup() {
Serial.begin(9600);
Serial1.begin(115200);
Serial2.begin(115200);
delay(10000);
Serial.println("setupend");
}
void loop() {
Serial.println("0");
Serial1.println("1");
Serial2.println("2");
delay(5);
}
Reading voltages from the TX1 and RX1 reads ground level. Reading from TX2 is ground level too, but TX2 is 3.4V, the opposite as expected.
The same code in a standard ESP32 (Wroom) works as expected (High for TX2 and low for RX2).
I guess that I am missing something with the configuration, but I don't know what could be. I would apreciate any help.