Changing a variable with a nextion screen

Is it possible to program for example a pin to go high for 20 sec and then change that time with a nextion screen?

So, if I had a relay driving a motor that was controlled by a pin on a photon. And I programed the photon to send the pin high and therefore turn the motor on when a button was pushed on the nextion screen.
Can I also program a slider that goes from 5 sec to 30 sec and get the photon to reference the slider value on the screen, so it knows how long I want to set the pin high for.

Theoretically possible since it mentions Arduino and Raspberry Pi. Will need more investigation:

https://www.itead.cc/display/nextion.html

Edit: there is a fair bit of material on the forum searching on nextion including a library.

With the enhanced Nextion displays you can even do it without an extra µC.

But sure, this library (with samples) is capable of helping you with that

1 Like