Skip to content

Instantly share code, notes, and snippets.

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