The Raspberry Pi RP2350 has a hardware issue that can cause its GPIO pins to read as high even when the internal pull-downs on the pins are enabled. See the Warning in the CircuitPython DigitalInout
documentation for more information about the problem.
This issue means that keypad
functionality that would normally depend on using the internal pull-down resistors will not work properly.
keypad.Keys
If you are setting up a keypad.Keys
object where value_when_pressed=True
(the switch connects to +V when pressed) and you are using pull=True
to enable the internal pull-down resistor, this will not work properly. Instead, either rewire the switch to be value_when_pressed=False
(the switch connects the pin to ground when pressed), or add an external pull-down that is 8.2 kohms or less.
The schematic diagram below shows how to wire a button so that its value_when_pressed
is False
.
keypad.KeyMatrix
A keypad.KeyMatrix object with columns_to_anodes=False
will normally depend on using the internal pull-down resistors. This will not work properly. The easiest fix is simply to swap the row_pins
and column_pins
and set columns_to_anodes=True
. An alternative is to add external pull-downs of 8.2 kohms or less, but that will draw more current, and swapping the pins in software is much easier.
An alternative is to add external pull-downs of 8.2 kohms or less, but that will draw more current, and swapping the pins in software is much easier.
Page last edited June 03, 2025
Text editor powered by tinymce.