reed.py 275 Bytes Raw Blame History Permalink 1 2 3 4 5 6 7 8 9 10 11 from machine import Pin, Signal data_pin = Pin(16, Pin.IN) # --------------------------------------------------- # # FUNCTIONS # --------------------------------------------------- # def work_reed() -> int: # 1 = Lid opened, 0 = Lid closed return data_pin.value()