well I using topway brand HMI display it is very easy to use with Arduino nano or UNO with rs232 converter. this my converter:
. for example this code is writing "63" number on display. it is working with arduino nano but not with ESP32 do you have any idea? HMI dispaly connected to uart2 pins which is RX2 and TX2 on ESP32 (also I am using 30 pin WROOM-32 model) . Even I have changed 16pin to 17 and 17pin to 16 in "ss.begin..." code still not working.
// TOPWAY Smart LCD interface with esp32
#include <HardwareSerial.h>
HardwareSerial ss(2);
void setup() {
ss.begin(9600, SERIAL_8N1, 17, 16);
Serial.begin(9600);
}
void loop() {
ss.write(0xaa); // packet head
ss.write(0x3d); // VP_N16 write command
ss.write(0x00); // VP_N16 address
ss.write(0x08);
ss.write(0x00);
ss.write(0x02);
ss.write(0x00); // VP_N16 data high byte
ss.write(63); // There should be writen on display "63"
ss.write(0xcc); // packet tail
ss.write(0x33); // packet tail
ss.write(0xc3); // packet tail
ss.write(0x3c); // packet tail
delay(1000);
Serial.println("ok");
}