I'm trying to create an HMI page as the Fotoperiod configurator for my Arduino Acuario Controlled project.
The page looks like this:
Inside the graph part, there are 24 sliders to program the Light Power for each hour.
I want to draw over it, a line joining all the sliders positions, in that way I can see graphically how will behave the light power during the day.
I already know how to draw the line between each slider actual position:
For example, in the case of Touch Release of slider corresponding to 02 hour, to draw the line you can use the code:
But I want to delete the previous lines, in order to keep the graph updated.
I tried picq with no success.
So am I to understand
- this you want to draw for a visual representation of
how the power will behave (according to your setting)
0100h power of 70%, 0110h power of 60%, 0120h power of 50%
0150h power of 20%, 0200h power of 10%, 0210h power of 20%
If at 02:52:18 is not intended and automatically changed to 62.3% power
then line is not really visually representing your power at all.
You may want a visual representation that will fit your actual
- when you know your actual,
then it will be more defined steps to accomplish visual of actual.
picq works as per the Nextion Instruction Set.
Thanks for your help Patrick.
This HMI page will work with an Arduino program. In this stage of the project I'm just programming the HMI.
Arduino will be in charge of set the right PWM output to dimm the led for the right power, just making the proportion calculation.
A straight line between the Power setting for 01h and the power setting for 02h will be a good realistic representation of what the arduino will set for led dimm.
The problem with picq is that it deletes the slidder buttom too (see pic attached)
This is the code I used for Touch Release of slider Hora02
I'd add three additional lines to draw three sliders.
I was thinking on that workaround Maze. Thanks!
But, to make it work, I have to move the picq instruction to Touch Press Event.
I'll try that when arriving home in a few hours.
Thanks for the help.
I wouldn't call it a work around
Is it not the steps required to achieve the task?
- then is that not just programming?
Your opinion is respectable Patrick.
Thanks for the help.