I got a Raspberry PI and use a camera to capture pictures. The capture is triggered with a switch on a GPIO port.
The web site (flask; on 127.0.0.1) should show when I trigger the switch and since the saving of the picture takes a while, should also show a wait/ready information.
@app.route("/")
def index():
show a green button on the web, check the GPIO for switches create my template and
render_template('index.html', **templateData) # seems not to work
wait for the existence of the captured image file and create an updated template
return render_template('index.html', **templateData)
if __name__ == "__main__":
app.run(host='0.0.0.0', port=80, debug=True)
I cannot figure out how I can update the web site twice, while I am waiting for the stored file.