#!/usr/bin/env python3 import os from flask import Flask from flask import request from flask import send_from_directory import edu app = Flask(__name__) led1 = edu.led(13) led2 = edu.led(15) btn1 = edu.button(16) btn2 = edu.button(18) buzzer = edu.buzzer(32) relay = edu.relay(11) @app.route("/") def index(): with open("./html/index.html") as f : res = f.read() return res @app.route("/test") def test(): return "TEST PAGE" @app.route("/html")
#!/usr/bin/env python3 import os from flask import Flask from flask import request from flask import send_from_directory import edu app = Flask(__name__) led1 = edu.led(13) led2 = edu.led(15) btn1 = edu.button(16) btn2 = edu.button(18) buzzer = edu.buzzer(32) relay = edu.relay(11) @app.route("/") def index(): with open("./html/index.html") as f: res = f.read() return res @app.route("/test") def test(): return "TEST PAGE" @app.route("/html")
from LCM import qc1602a import edu system_run = 1 cmd_buff = '' led1_pin = 13 led2_pin = 15 relay_pin = 11 buzzer_pin = 32 button1_pin = 16 button2_pin = 18 ser = Serial("/dev/ttyAMA0",baudrate=115200) lcm = qc1602a() led1 = edu.led(led1_pin) led2 = edu.led(led2_pin) rel = edu.relay(relay_pin) buz = edu.buzzer(buzzer_pin) def shutdown(): global lcm global system_run lcm.stop = 1 system_run = 0 def btn1_func(ch): global led1 global lcm global ser