Esempio n. 1
0
def main():
	limitPin = 23
	gpio.setMode(limitPin, "in")
	while True:
		if gpio.read(limitPin) == gpio.LOW:	# <1>
			print("Touch detected!")
		time.sleep(0.5) 
Esempio n. 2
0
def main():
	limitPin = 23
	gpio.setMode(limitPin, "in")
	while True:
		if gpio.read(limitPin) == gpio.LOW:	# <1>
			print("Touch detected!")
		time.sleep(0.5) 
Esempio n. 3
0
def readLimit():
    limitPin = 23
    gpio.setMode(limitPin, "in")
    return gpio.read(limitPin)
def readLimit():
  limitPin = 23
  gpio.setMode(limitPin,"in")
  return gpio.read(limitPin)