hausbrand/bar.py
2023-04-09 22:09:35 +02:00

11 lines
265 B
Python

import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM) # GPIO Numbers instead of board numbers
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
#print (GPIO.input(23))
time.sleep(0.1)
if (GPIO.input(23) == 0)
print ("ringing")