Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from flask import Flask, render_template
- from Servo import *
- from time import sleep
- ...
- servos.enablePWMs(True)
- print(servos.servos)
- app = Flask(__name__)
- @app.route("/")
- @app.route("/<state>")
- def updates(state=None):
- if state == "Start":
- servos.enablePWMs(True)
- ...
- template_data = {
- "title" : state,
- }
- return render_template("quadruped.html", **template_data)
- if __name__ == "__main__":
- app.run(host="0.0.0.0", port=5000, debug=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement