Commit dbff3422 authored by Hugo Hörnquist's avatar Hugo Hörnquist

Remove test files.

parent cc8d5c65
import RPi.GPIO as g
g.setmode(g.BCM)
g.setup(22, g.IN)
print g.input(22)
#!/usr/bin/env python2
import RPi.GPIO as g
import time
g.setmode(g.BCM)
g.setup(17, g.IN)
g.setup(18, g.OUT)
while True:
print g.input(17)
time.sleep(0.1)
# print input_value
#g.output(18, g.HIGH)
#!/usr/bin/env python2
import RPi.GPIO as g
g.setmode(g.BOARD)
g.setup(11, g.IN)
g.setup(12, g.OUT)
input_value = g.input(11)
g.output(12, g.HIGH)
#!/usr/bin/env python2
import RPi.GPIO as g
import time
g.setmode(g.BCM)
# pins = range(0, 26)
# for pin in pins:
# g.setup(pin, g.IN)
pins = [ 5, 6 ]
# while True:
# #for pin in pins:
# input = g.input(pin)
# if input:
# print "pin {0} is high".format(pin)
def callback_rise(pin):
print "rise", pin
def callback_fall(pin):
print "fall", pin
for pin in pins:
g.setup(pin, g.IN)
g.add_event_detect(pin, g.RISING, callback=callback_rise)
#g.add_event_detect(pin, g.FALLING, callback=callback_fall)
time.sleep(1000)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment