Post about your Basic project here

Moderator: Mmiscool

User avatar
By forlotto
#48838 hrmmm interesting but on the plus side it will prevent screen burn in if you are using an LCD that is always on...

how often is it flashing ?

You could just refresh it off of a timer or create a hardware button with an interrupt to do the refresh or a software button the kicker is I don't know what you are doing.

What is the goal of the end project, do you have an external screen is it a touch screen, etc or is this all phone controlled or web controlled I am rather sure there is a solution...

Returngui as stated will refresh the page the interval this happens at is up to you ...


delay 60000
returngui

Should fix the problem this way it will only flash and update every minute.

add that delay before return gui

The other thing you could do is go even more time if needed every 10 Minutes just add another zero.
User avatar
By joeman2116
#48839
forlotto wrote:hrmmm interesting but on the plus side it will prevent screen burn in if you are using an LCD that is always on...

how often is it flashing ?

You could just refresh it off of a timer or create a hardware button with an interrupt to do the refresh or a software button the kicker is I don't know what you are doing.

What is the goal of the end project, do you have an external screen is it a touch screen, etc or is this all phone controlled or web controlled I am rather sure there is a solution...

Returngui as stated will refresh the page the interval this happens at is up to you ...


delay 60000
returngui

Should fix the problem this way it will only flash and update every minute.

add that delay before return gui

The other thing you could do is go even more time if needed every 10 Minutes just add another zero.


It flashes about every 3 seconds. I use it as a webserver on a pc and android phones /tablets
The thing is, in v2 there is no flashing of the page only the data gets flashed....
So must be some other code missing...
User avatar
By forlotto
#48840 Not a good idea imho no need to hammer your device for a temperature that often to be honest every 3 seconds is a little extreme there is no amount of data you can gather that way most weather stations and sites work on the time frame of 10minute intervals while this is not a standard it is standard practice ... so a delay of 600000 would be appropriate imho but hey its not my project a flash every 10minutes wouldn't hurt. To me just the needing of data down to that level if not even used by most weather apps the most scientific people out there collecting data about weather is begging for trouble. Not to mention while the esp may be able to handle it I don't think it was purposed to be hammered like this and the life span will be greatly reduced. If you have not read anything about the flash memory on the esp it is of the cheaper variety can only handle so many writes reads etc... May be in your best interests to reconsider but this is entirely up to you it is your project.

Returngui I recall reading a statement somewhere that it does indeed refresh the entire page in doing so you will indeed see a flash there is no way around it I believe it refreshes all html data AKA the page. There is lag between getting the data and putting it to the screen ...

As far as htmlvars I'm not sure it may only refresh that portion hrmmm

What you could do is use msgbranch and iframes so the variables refresh rather than the whole page ;)

This would require the use of javascript the removal of I frames etc...

Or you could set the refresh time to 10 minutes and then have a button which will trigger a sub to check it ...

I am not sure have not gotten through the whole documentation of htmlvars etc but for now I will leave it at this there is likely a solution out there that will work I cannot promise it will be verbatim but a solution that will work.

Anyhow I hope I have been helpful to you and your project and look forward to you sharing the final result with the community I am going to have to cash in for now sorry need to do the early bird thing daily to earn all that big money that is wanted from me.

Take Care,

forlotto
User avatar
By joeman2116
#48865 forlotto,

I appreciate your inputs, another perspective is always valuable.

The most difficult part is the lack of good examples. The documentation is there but without examples to display exactly how it is used, it makes it extremely difficult to find a solution.

If a few good projects were completed, using some html coding examples to change backgrounds / tables , buttons,image buttons, sensors , such as pir and or temp stuff. etc then the new learners would have a foundation to build from.
I know it takes time, but the quickest way to learn is seeing something work and to try to modify it to see if you can make it do more or to build a new app with the work samples.......

Converting a simple thermostat program to work as well as it did in v2, with html , tables, etc should be easy to produce the same results, if not easier in v3..... I ramble on......

EspBasic is a great product, an innovative idea, and desires all the support for the effort the author is putting in to it. I have been excited at its potential
The author needs help but It appears there is not enough expertise to provide good working projects to kick start things.
If we had good project examples he would have many more helpers to build and demonstrate the power of this application...

Make the project and showESPBasic's power !!

The best kick start to any project is to display what it can do.
The extra bonus it also provides a learning tool to work from.....

Thanks
Joe :D