Skip to content

Instantly share code, notes, and snippets.

@pierre-rouanet
Created February 8, 2018 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pierre-rouanet/d005f78719aa565500c7c24ed96b6c0d to your computer and use it in GitHub Desktop.
Save pierre-rouanet/d005f78719aa565500c7c24ed96b6c0d to your computer and use it in GitHub Desktop.
from pyluos import Robot
robot = Robot('/dev/cu.usbserial-14310')
button = robot.btn_gpios.p8
blue_led = robot.led_gpios.p2
while True:
if button.is_high():
blue_led.set_high()
else:
blue_led.set_low()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment