Skip to content

Instantly share code, notes, and snippets.

@iann0036
Created December 21, 2017 06:43
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
Play with the front LED lights on the DeepLens device
import os
from time import sleep
gpio_path = "/sys/class/gpio/"
with open(gpio_path + "gpio437/direction", 'w') as direction:
direction.write('out')
with open(gpio_path + "gpio443/direction", 'w') as direction:
direction.write('out')
while True:
with open(gpio_path + "gpio437/value", 'w') as value:
value.write('0')
sleep(0.3)
value.flush()
with open(gpio_path + "gpio443/value", 'w') as value:
value.write('0')
sleep(0.3)
value.flush()
with open(gpio_path + "gpio437/value", 'w') as value:
value.write('1')
sleep(0.3)
value.flush()
with open(gpio_path + "gpio443/value", 'w') as value:
value.write('1')
sleep(0.3)
value.flush()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment