-
Notifications
You must be signed in to change notification settings - Fork 35
Description
The picozero DigitalInputDevice class allows for the pull_up method to be set as follows from the documentation:
: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.
Contrast this to the MicroPython machine.Pin class:
pull specifies if the pin has a (weak) pull resistor attached, and can be one of:
None - No pull up or down resistor.
Pin.PULL_UP - Pull up resistor enabled.
Pin.PULL_DOWN - Pull down resistor enabled.
Thus machine.Pin allows for the explicit use of an external pull_up or pull_down resistor, whereas DigitalInputDevice forces an external resistor to be in parallel with the internal resistor.
Was this an intentional choice?
Please consider adding the None case to DigitalInputDevice.