A bit of a background "I am a Newbie" to this, so would appreciate if you could help.
I am tasked with developing an irrigation system for my allotment by the wife(bless her).
So as with all things i have taken the task on and its going to be challenging and Fun.
I have managed to create( so far ) a simple set of screen on the Nextion 4.3 inch screen and so far have buttons responding.
The issue i have is now updating the progress bar. I have tried to follow the documentation and am using the Nextion Library.
The progress bar is on : page 11, id = 6, name ="Zone1Progress"
This is the output of the serial monitor.
and the progress bar does not get updated.
Can someone advise what /if i am doing incorrect.
Greatly appreciated. " Remember I am a newbie please"
page 0���recvRetCommandFinished err
Zone1 was selected[1705:3,3,Zone1_on]
Zone 1 has been switched on
Just need to work out how to send the val
Page 11, component 6, Zone1Progress
get Zone1Progress.val���recvRetNumber err
forgot to mention i am suing a MEGA 2560, which i have set so that i can debug via the serial as per instructions i found ( i think on here)
here is the hmi file as well Doh! Using the latest Nextion editor
Nothing wrong in debug
Zone1Progress.val=23ÿÿÿ works well from page 11
it does not appear to change for me.
not sure what else i can do,
Will give it another go and see whats what.
Thanks for your help
OK, so now I feel a little stupid, but this is how you learn.
in the config.h file i needed to comment out define DEBUG_SERIAL_ENABLE so it reads
There are a few bits of code to now replace, sending the output to the correct serial for debugging.
Does make me question: why I am coding the progress bar to increment. Is this something that can be done directly on the Nextion, so that on entering my page (11), my progress bar would start to increment every second by 1, Is this something i could code under the preinitialize or postinitialize event. If its possible could you advise.
Once again. Thanks. I am now well on my way :)
HMI: Human Machine Interface.
Input - Human Interaction, Input sent to MCU
MCU evaluates, executes if safe to do so
Status - MCU updates display to current status.
Incrementing this Nextion side could indeed be animated.
- whether or not it actually occurred or not becomes the question
- if what you see for status results is questionable, would you use it?
It's Saturday night, you are getting ready to put Pizza into the oven
- you input to select your temperature to preheat the oven.
- a bit of time goes by and "Ding" ... so you slide your Pizza in
- You get back to your Card game with the guys and wait.
When you have waited for 45 mins you go back to the oven
Now your readout was animated display side, so now what
- oven never preheated - you only saw an animation of it
Do you not think you and the guys are going to be a bit disappointed?
- will the guys be likely to play Cards at your place again?
PS: files named read.me, readme.txt, readme.md ... have purpose.
Cleary its been a long day for us both. Whilst I appreciate the Pizza analogy, its not particularly helpful.
Whilst I am not to bothered about the animation, the 8 year old who has been sat intrigued, watching me and inspired by Daddy's handy work does. Hopefully not put off by the amount of effort I am putting in....
As for reading, i have done my share over the last few days to get this up and running and will continue.
Love the Free Chat, it really does help to know that there is someone out there that knows a little more than you, but sadly appears to know it too. and just cant help them selves.
In short, not a good idea to animate a progress bar.
in your irrigation system you will truly and actually want to know % left of progress.
the progress of watering will not solely be measured by time
- how much water flowed, how much was absorbed and current ground wetness
So your MCU will want to measure these things in real time
these will be recalculated and influence a new accurate progress status.
One weekend's water session vs another weekend's watering session
is going to be very different based on what Nature delivered through the week.
You are indeed going to want accurate real readings to tweak your MCU code.
And yes, I do know that I am well versed in affairs of Nextion and programming.
Such knowledge came from working at it - but such is not sad at all
Worse would be getting answers from those who merely cut copy and paste,
and through learning a new buzzword this week, now want to use it.
Or even worse, not finding an answer at all because the ones in the know
aren't interested in volunteering their time to share their knowledge - timely.
Sad might be the amount of time going in circles down wrong paths only because
"buzzword expert" relay bad information, or real answers are simply not available.
Appreciate your help, your volunteering. It is one of the reason's that i decided to ask for assistance in the 1st place. Having read many posts, previously and searching for the issue i encountered, I could see that you appear to answer most question raised, which is great. You are quite right in terms of measuring many other things before committing to animate the progress. The project is in its early days and i will consider flow rate based on the pump and flow thru the valves. Soil moisture etc, the sensors only arrived yesterday. Real time tests in the field will also be carried out.
Look forward to asking many more questions in the hope that I will understand what Nextion is capable off.
your picture for background should maybe start with a full screen sized picture
- this will help you determine which page you are on more clearly.
(not full sized can even cause an overread and produce funky color results)
progress bar on 11th page needs to be called from the 11th page
- if progressbar is global, (setting .vscope to global)
this will have all the green editor attributes for progress saved globally
but even if global does not make the drawing or event code accessible.