Closed RDickens closed 5 years ago
Great catch! I had intentionally done this the way it's written as the use cases I was considering were followed by an ESP.reset()
. Of course, I forgot the MQTT command lcdreset
which doesn't also reset the ESP.
Next release will have this fix, thank you for digging into it, pointing it out, and providing an easy solution!
New reset code in latest HASP release v0.35
The
nextionReset()
function does not work.You have set the
digitalWrite(nextionResetPin, LOW);
but did not set it HIGH againvoid nextionReset()
{
digitalWrite(nextionResetPin, LOW);
Serial1.print("rest");
Serial1.write(nextionSuffix, sizeof(nextionSuffix));
Serial1.flush();
delay(2000);
}
I have added a
digitalWrite(nextionResetPin, HIGH);
andmqttClient.disconnect();
. This turns on the power to the diplay again and also forces the diplay to re-connect and sync.void nextionReset()
{
digitalWrite(nextionResetPin, LOW);
Serial1.print("rest");
Serial1.write(nextionSuffix, sizeof(nextionSuffix));
Serial1.flush();
delay(2000);
digitalWrite(nextionResetPin, HIGH);
mqttClient.disconnect();
}