Hey friends
I have a general question that always conused me.
As far as i understand it: when you unplug and plug in the ESP32 (even the ardunio) the code "runs" thorough your SETUP-section. right?
For example:
void setup() {
nexInit();
Serial.begin(9600);
Serial2.begin(9600, SERIAL_8N1, RXD2, TXD2);
EEPROM.begin(64);
init_1.beginInitializeSendToNextion();
Serial2.print("version.txt=\"");
Serial2.print("DDDD");
Serial2.write('"');
Serial2.write(0xFF);
Serial2.write(0xFF);
Serial2.write(0xFF);}
init_1.beginInitializeSendToNextion() is a function that gets values out of the EEPROM and writes them into my Nextion device. It works and everything is good when i undplug and plug in my ESP.
But why isnt this party working?
Serial2.print("version.txt=\"");
Serial2.print("DDDD");
Serial2.write('"');
Serial2.write(0xFF);
Serial2.write(0xFF);
Serial2.write(0xFF);
When i upload my scetch the text "DDDD" appears on my Nextion.Perfect. But shouldnt it also appear when i unplug and replug my ESP32?