Skip to content

Instantly share code, notes, and snippets.

@attilavago
Created January 6, 2017 21:30
Show Gist options
  • Save attilavago/365f3e477e3fbb3122e4fdd3d7d0da30 to your computer and use it in GitHub Desktop.
Save attilavago/365f3e477e3fbb3122e4fdd3d7d0da30 to your computer and use it in GitHub Desktop.
Simple demo python program for EV3
#!/usr/bin/env python3
from ev3dev.ev3 import *
import ev3dev.ev3 as ev3
ts = ev3.TouchSensor()
while True:
ev3.Leds.set_color(ev3.Leds.LEFT, (ev3.Leds.GREEN, ev3.Leds.RED)[ts.value()])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment