How can I trigger the programmed loop in Arduino to start with a press of a button from Nextion.
I built the .UNO and HMI.
It is for a project I'm building Please Help!
You can not in this manner.
Aurduino runs setup(), and immediately loop()
For this there is no intervention.
Please look at the Iteadlib Arduino Nextion Library
You will want to download and install.
Please configure NexConfig.h for the UNO as directed in readme.md
Then take a look through the library examples
The way this works is the Nextion is initialized in the setup() with nexInit()
Arduino loop() runs immediately after setup
in each iteration of the loop
- nexListen looks for your Nextion Touch Events
- if one is found and you have set it up,
then nexListen will call your procedure.
- all other things you define in your loop() will be run
At the end of loop, loop() starts all over again.
CompButton example will show you how to trigger code from a button
Study the library code, study the examples.