+
+ # is pin a pull up and pin is LOW?
+ if self._pull == Pin.PULL_UP and self.current_value == False:
+ self.current_value = True
+ # is pin a pull down and pin is HIGH?
+ if self._pull == Pin.PULL_DOWN and self.current_value == True:
+ print("switching PDR to False")
+ self.current_value = False
+