Skip to content

Instantly share code, notes, and snippets.

@iann0036
Created December 21, 2017 06:43
Show Gist options
  • Save iann0036/a746dd80c062d433f5c8824339705b0a to your computer and use it in GitHub Desktop.
Save iann0036/a746dd80c062d433f5c8824339705b0a to your computer and use it in GitHub Desktop.
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