We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents d3e5c4b + 82f8da9 commit 1552cb6Copy full SHA for 1552cb6
adafruit_pcf8574.py
@@ -90,7 +90,7 @@ def write_pin(self, pin: int, val: bool) -> None:
90
91
def read_pin(self, pin: int) -> bool:
92
"""Read a single GPIO pin as high/pulled-up or driven low"""
93
- return (self.read_gpio() >> pin) & 0x1
+ return ((self.read_gpio() >> pin) & 0x1) == 1
94
95
96
"""
0 commit comments