Hi guys I need help.
I want to do a simple test where when a button is pressed on the nextion display, a text box below will show a message "Hello"
I am stuck in this please help
#include <EasyNextionLibrary.h>
// Create an EasyNex object
EasyNex myNex(Serial1);
// Define the trigger function
void trigger0() {
// Set the text of the text box to "Hello"
myNex.writeStr("t0.txt", "Hello");
Serial.println("TRIGGERED");
}
void setup() {
// Begin serial communication with the Nextion display
Serial.begin(9600);
// Initialize the EasyNex library
myNex.begin(9600);
}
void loop() {
// Listen for events from the Nextion display
myNex.NextionListen();
}
I am using easynextionlibraryand want to use trigger, as in my project requires me to use trigger function
Button.zip (18.7 KB)
conncections are:
Arduino | Nextion
TX1 | RX
RX1 | TX
GND | GND
5V | 5V
please help @cattledog
This is a new problem