And the GPIO clean-up is after that definition, just before you decide
to hand control over to Flask by calling app.run().
GPIO.cleanup()
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')
You're cleaning up the GPIO before Flask gets to run and that probably
undoes all your GPIO and PWM configuration. Assuming run() can return,
I forget, move the clean up:
if __name__ == '__main__':
app.run(debug=True, host='0.0.0.0')
GPIO.cleanup()
Thanks Ralph, Things happen now.
Peter
--
Next meeting: BEC, Bournemouth, Tuesday, 2019-07-02 20:00
Check to whom you are replying
Meetings, mailing list, IRC, ... http://dorset.lug.org.uk/
New thread, don't hijack: mailto:dorset@mailman.lug.org.uk