Play with the front LED lights on the DeepLens device
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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