A simple example of using an HTML range slider to send values to a Flask server with no JavaScript using a form submit. This file is a starter challenge. Used for Google's Code Next Team Edge Web course.
- Clone the project to a Raspberry Pi.
- Make sure you have installed Python Flask.
- Fromt the Linux Terminal, cd into the directory you cloned the repo into.
- run app.py:
$ python app.py. to launch the Flask server and go to the specified URL to open in a client browser. - Test that the slider works when you click "Submit".
- Connect your Pi to a Servo using following a pinout example from GPIO Zero.
- In
app.py, complete the POST method function that receives the value from the HTML slider so it moves the servo to the desired angle, only between 0-180 degrees. - Make sure to import the necessary libraries.
- Test and debug.