Skip to content

Instantly share code, notes, and snippets.

@AlexanderMalmstrom
Created January 9, 2016 18:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save AlexanderMalmstrom/9a2677981bbe34c808c6 to your computer and use it in GitHub Desktop.
Save AlexanderMalmstrom/9a2677981bbe34c808c6 to your computer and use it in GitHub Desktop.
@app.route('/todo/api/v1.0/led/<int:led>/<int:on>', methods=['GET'])
def test(led, on):
if on == 1 & 11 <= led <= 13:
GPIO.output(led, GPIO.HIGH)
if on == 0 & 11 <= led <= 13:
GPIO.output(led, GPIO.LOW)
else:
abort(404)
return('test')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment