latest
This commit is contained in:
parent
b1e002ddf7
commit
f1147be300
@ -15,6 +15,7 @@ pexpect==4.8.0
|
||||
platformdirs==2.4.0
|
||||
ptyprocess==0.7.0
|
||||
regex==2021.10.23
|
||||
tenacity==8.0.1
|
||||
tomli==1.2.2
|
||||
typed-ast==1.4.3
|
||||
typing-extensions==3.10.0.2
|
||||
|
15
server.py
15
server.py
@ -5,9 +5,20 @@ from colormap import rgb2hex
|
||||
app = Flask(__name__)
|
||||
|
||||
|
||||
@app.route("/")
|
||||
@app.route("/on")
|
||||
def index():
|
||||
return "Index Page"
|
||||
os.system(
|
||||
f"gatttool -i hci0 -b b2:3b:03:00:14:d6 --char-write-req -a 0x0009 -n cc2333"
|
||||
)
|
||||
return "On"
|
||||
|
||||
|
||||
@app.route("/off")
|
||||
def index():
|
||||
os.system(
|
||||
f"gatttool -i hci0 -b b2:3b:03:00:14:d6 --char-write-req -a 0x0009 -n cc2433"
|
||||
)
|
||||
return "Off"
|
||||
|
||||
|
||||
@app.route("/colour")
|
||||
|
Loading…
x
Reference in New Issue
Block a user