You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using esp32-WroomU with nextion nx8048k07-011c. Specifically trigger functions are a problem but other functions using printh on nextion side are also an issue.
I am trying to use the trigger functions of the library by invoking them using printh 23 02 54 xx(relevant hex code) but the trigger only seems to go through only one third of the time. I have done many variations of the same code to pinpoint the problem to describe more accurately, but the circumstances seem to arbitrarily effect the result, I say this because the conditions that make currentpageid related printh calls work do not make the trigger printh calls work.
Here is the problem code as simple as I can make it.
`
#include "EasyNextionLibrary.h" // Include EasyNextionLibrary
#define Buzzer 25
EasyNex myNex(Serial); // Create an object of EasyNex class with the name < myNex >
// Set as parameter the Hardware Serial you are going to use
void setup(){
myNex.begin(9600); // Begin the object with a baud rate of 9600
// If no parameter was given in the begin(), the default baud rate of 9600 will be used
pinMode(BUZZER, OUTPUT);
}
void loop(){
myNex.NextionListen(); // This function must be called repeatedly to response touch events
// from Nextion touch panel. Actually, you should place it in your loop function.
}
void trigger0(){ //This only gets called about one third of the time regardless of current page, the string/ num value I am changing or where the trigger function is called.
digitalWrite(Buzzer, HIGH);
myNex.writeStr("b0.txt", "aaaaa");
}
`
sidenote: I managed to make the currentpageid sending printh calls work by only using them in the preinitialize event and the last page visited must have a pageexit event. otherwise they work only one third of the time as well
The text was updated successfully, but these errors were encountered:
but other functions using printh on nextion side are also an issue.
There have been two postings in the past year on the Arduino forum about serial output issues with intelligent series displays. My conclusion is that there is some sort of hardware issue with that model.
I am using esp32-WroomU with nextion nx8048k07-011c. Specifically trigger functions are a problem but other functions using printh on nextion side are also an issue.
I am trying to use the trigger functions of the library by invoking them using printh 23 02 54 xx(relevant hex code) but the trigger only seems to go through only one third of the time. I have done many variations of the same code to pinpoint the problem to describe more accurately, but the circumstances seem to arbitrarily effect the result, I say this because the conditions that make currentpageid related printh calls work do not make the trigger printh calls work.
Here is the problem code as simple as I can make it.
`
#include "EasyNextionLibrary.h" // Include EasyNextionLibrary
#define Buzzer 25
EasyNex myNex(Serial); // Create an object of EasyNex class with the name < myNex >
// Set as parameter the Hardware Serial you are going to use
void setup(){
myNex.begin(9600); // Begin the object with a baud rate of 9600
// If no parameter was given in the begin(), the default baud rate of 9600 will be used
pinMode(BUZZER, OUTPUT);
}
void loop(){
myNex.NextionListen(); // This function must be called repeatedly to response touch events
// from Nextion touch panel. Actually, you should place it in your loop function.
}
void trigger0(){ //This only gets called about one third of the time regardless of current page, the string/ num value I am changing or where the trigger function is called.
digitalWrite(Buzzer, HIGH);
myNex.writeStr("b0.txt", "aaaaa");
}
`
sidenote: I managed to make the currentpageid sending printh calls work by only using them in the preinitialize event and the last page visited must have a pageexit event. otherwise they work only one third of the time as well
The text was updated successfully, but these errors were encountered: