Did you look at some of the links in my last post?
In this link using AJAX(no reload of Brower) and update random value every 10-sec.
Someone has tested code on Raspberry Pi.
Here a link with Advanced Python Scheduler,no AJAX,but a trick for updating web-page.
In this link using AJAX(no reload of Brower) and update random value every 10-sec.
Someone has tested code on Raspberry Pi.
YogiMike Wrote:Thanks for the post snippsat. I used your example (with data changes) to use flask on my Raspberry Pi 2 with a Sense Hat to have a dynamic webpage which automatically updates Humidity, Temp, Barometric Pressure, and other data. It worked marvelously!!
Here a link with Advanced Python Scheduler,no AJAX,but a trick for updating web-page.
window.onload = timedRefresh(15000);This can be useful if don't need update all the time.
Quote:Flask may have an extension for WebSocket; I'm not sure. Either way, you still need to make changes client-side.The most used way for this in this in Flask is to use Flask-SocketIO and socket.io on the client side.