Skip to content

Commit

Permalink
Add yellow route
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Häussler <[email protected]>
  • Loading branch information
cniweb committed Nov 18, 2021
1 parent 20e01bf commit ba9fa9b
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,21 @@ def set_red():

return jsonify(data)

@app.route('/yellow')
def set_yellow():
set_brightness(0.5)

for x in range(NUM_PIXELS):
set_pixel(x, 255, 255, 0)
show()

data = {
"status": 200,
"message": "Lights are now yellow"
}

return jsonify(data)

@app.route('/green')
def set_green():
set_brightness(0.5)
Expand Down

0 comments on commit ba9fa9b

Please sign in to comment.