Created
January 6, 2017 21:30
-
-
Save attilavago/365f3e477e3fbb3122e4fdd3d7d0da30 to your computer and use it in GitHub Desktop.
Simple demo python program for EV3
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
#!/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