Skip to content

Commit

Permalink
sparkle
Browse files Browse the repository at this point in the history
  • Loading branch information
Peter Bestoso authored and Peter Bestoso committed Mar 3, 2017
1 parent b47a448 commit 3140651
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions server.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ def wave_lights():
done = False
if done:
return


def randomize():
for i in range(5):
set_light(i, random.random())

@app.route('/wave')
def wave_endpoint():
wave_lights()
Expand Down Expand Up @@ -145,12 +149,16 @@ def set_all_endpoint():

@app.route('/rand')
def random_endpoint():
for i in range(5):
set_light(i, random.random())

randomize()
return '{}'


@app.route('/sparkle')
def sparkle_endpoint():
for i in range(100):
randomize()
ell_lights_up()
return '{}'

if __name__ == '__main__':
all_lights_up()
app.run(debug=True)

0 comments on commit 3140651

Please sign in to comment.