Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion picozero/picozero.py
Original file line number Diff line number Diff line change
Expand Up @@ -2130,6 +2130,7 @@ class DigitalInputDevice(InputDevice, PinMixin):
:param bool pull_up:
If :data:`True`, the device will be pulled up to HIGH. If
:data:`False` (the default), the device will be pulled down to LOW.
If :data:'None', the device will not be pulled either HIGH or LOW.

:param bool active_state:
If :data:`True` (the default), the device will return :data:`True`
Expand All @@ -2148,7 +2149,7 @@ def __init__(self, pin, pull_up=False, active_state=None, bounce_time=None):
super().__init__(active_state)
self._pin_num = pin
self._pin = Pin(
pin, mode=Pin.IN, pull=Pin.PULL_UP if pull_up else Pin.PULL_DOWN
pin, mode=Pin.IN, pull=Pin.PULL_UP if myvalue else pull=Pin.PULL_DOWN if myvalue == False else pull=Pin.None
)
self._bounce_time = bounce_time
self._last_callback_ms = (
Expand Down