File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 77#include <string.h>
88
99#include "py/gc.h"
10+ #include "py/mphal.h"
1011#include "py/runtime.h"
1112#include "shared-bindings/digitalio/DigitalInOut.h"
1213#include "shared-bindings/keypad/EventQueue.h"
@@ -133,6 +134,10 @@ static void keymatrix_scan_now(void *self_in, mp_obj_t timestamp) {
133134 // to switch values. Just switching to an input with a (relatively weak) pullup/pulldown
134135 // causes a slight delay in the output changing, which can cause false readings.
135136 common_hal_digitalio_digitalinout_set_value (row_dio , self -> columns_to_anodes );
137+
138+ // Wait a moment to let the columns settle.
139+ mp_hal_delay_us (1 );
140+
136141 // Switch the row back to an input, pulled appropriately
137142 common_hal_digitalio_digitalinout_switch_to_input (
138143 row_dio , self -> columns_to_anodes ? PULL_UP : PULL_DOWN );
You can’t perform that action at this time.
0 commit comments