Skip to content

Instantly share code, notes, and snippets.

@pierre-rouanet
Created February 2, 2018 15:24
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/2b76b85f766800368a95b835ab94cff7 to your computer and use it in GitHub Desktop.
Save pierre-rouanet/2b76b85f766800368a95b835ab94cff7 to your computer and use it in GitHub Desktop.
from itertools import cycle
from time import sleep
from pyluos import Robot
freq = 2.0
if __name__ == '__main__':
r = Robot('/dev/cu.usbserial-14310')
leds = (r.led_gpios.p2, r.led_gpios.p3, r.led_gpios.p4)
for led in cycle(leds):
led.toggle()
sleep(1.0 / freq)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment