Beaglebone Black binary sensor (#5422)
* Configuration parameters defined * Edge detection added * Example configuration added and tipo corrected * Comments updated, lint update * Added check for input pull_mode * Too long line * trailing white space * Configuration parameters defined * Edge detection added * Example configuration added and tipo corrected * Comments updated, lint update * Added check for input pull_mode * Too long line * trailing white space * pylint disable import error * read_input() changed to return boolean value, according changes in binary sensor * example configuration in docstring changed to mention direct web link, pylint update * read_input() updated according review
This commit is contained in:
1 parent
067e11ea5c
commit
f4d2d69a5d
2 files changed
+90
-1
No files matched your search
@@ -63,7 +63,7 @@ def read_input(pin):
|
||||
"""Read a value from a GPIO."""
|
||||
# pylint: disable=import-error,undefined-variable
|
||||
import Adafruit_BBIO.GPIO as GPIO
|
||||
return GPIO.input(pin)
|
||||
return GPIO.input(pin) is GPIO.HIGH
|
||||
|
||||
|
||||
def edge_detect(pin, event_callback, bounce):
|
||||
|
||||
Reference in new issue
Block a user