Last active
August 29, 2015 14:16
-
-
Save felipefdl/857482c7911898fd80aa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
from tago import Tago | |
import RPi.GPIO as GPIO | |
my_device = Tago('a59d8000-80c6-11e4-95c1-295f66956ea3').device | |
GPIO.setmode(GPIO.BCM) | |
GPIO.setup(4, GPIO.OUT) | |
def func_callback_data(data): | |
if data['value'] == True: | |
GPIO.output(4, True) | |
else: | |
GPIO.output(4, False) | |
my_device.listening(func_callback_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment