Esempio n. 1
0

status = 0


def pressed(input):
    global status
    if input != status:
        if input == 1:
            status = 1
            pressedAction()
        status = input


actLED = -1
print "start"
while 1:
    dist = readdist.readDist(distTrigger, distInput)
    print dist
    leds = min(len(dioden), int(dist / normaliser))
    print leds
    setup()
    for port in dioden:
        GPIO.output(port, 0)

    for port in dioden[0:leds]:
        GPIO.output(port, 1)
    time.sleep(0.1)

GPIO.cleanup()
Esempio n. 2
0
def readLeft():
	return readdist.readDist(16,18)
Esempio n. 3
0
import readdist

print readdist.readDist(16,22)
Esempio n. 4
0
def readRight():
	return readdist.readDist(16,22)
Esempio n. 5
0
import readdist

print readdist.readDist(16,18)