-
-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serial2 stopped working #66
Comments
I confirm!
The code is simple #include <HardwareSerial.h>
#include <EasyNextionLibrary.h> /* https://github.com/Seithan/EasyNextionLibrary */
#include <Arduino_JSON.h> /* https://github.com/arduino-libraries/Arduino_JSON */
#define DEBUG_RX 3
#define DEBUG_TX 1
HardwareSerial Serial_Debug(0);
#define BASE_RX 26
#define BASE_TX 25
HardwareSerial Serial_Base(1);
#define DISPLAY_RX 16
#define DISPLAY_TX 17
HardwareSerial Serial_Display(2);
EasyNex serial_display(Serial_Display);
template<typename T>
void DEBUG_PRINT(const String &argument, const T &value) {
if (Serial_Debug) {
Serial_Debug.print(argument);
Serial_Debug.print(": ");
Serial_Debug.println(value);
}
}
void setup() {
delay(100);
Serial_Debug.begin(115200);
while (!Serial_Debug) {}
DEBUG_PRINT("DEBUG", "Init Debug Module");
delay(250);
Serial_Base.begin(115200, SERIAL_8N1, BASE_RX, BASE_TX);
while (!Serial_Base) {}
DEBUG_PRINT("DEBUG", "Base UATR Started");
delay(250);
Serial_Display.begin(115200, SERIAL_8N1, DISPLAY_RX, DISPLAY_TX);
while (!Serial_Display) {}
DEBUG_PRINT("DEBUG", "Display UATR Started");
delay(250);
send_to_display("page Boot");
delay(4250);
send_to_base("SYS", "Display Started", "");
}
void loop() {
serial_display.NextionListen();
} Debug Serial:
After that the app crashes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I appreciate that you put so much effort into making Nextion easy to use with your library. It is elegant.
I have used
EasyNex myNex(Serial2)
with ESP32 for the last two years, and it used to work perfectly. Nevertheless, It stopped yesterday when I tried it again.Here is an example of how I used to use it: The Nextion first restarted with ESP32 and then went to page home.
This code used to work very well till yesterday.
I tried:
1- Use another ESP32 board ; not work. I still read what I print via the serial monitor.
2- I re-upload the code to an old ESP32, which worked before I flushed it and uploaded the code again. The MCU did not communicate after reuploading the code.
3- I used another Nextion display, it did not work.
4- Use the default Serial pins
EasyNex myNex(Serial);
It worked.
5- I used Arduino boards, Mega and Giga R1 WiFi with
EasyNex myNex(Serial2)
. It worked perfectly.Then I used hardware serial between the
EasyNex myNex(Serial2)
as follows and it worked with all boards and displays.Would you please advise if something is wrong and why it doesn't work as it does in the fashion way?
Thanks for any help.
The text was updated successfully, but these errors were encountered: