diff options
| author | feurig <don@suspectdevices.com> | 2021-06-20 21:45:17 -0700 |
|---|---|---|
| committer | feurig <don@suspectdevices.com> | 2021-06-20 21:45:17 -0700 |
| commit | 5d2538860565ace89f2797aae46b5d060c5bd802 (patch) | |
| tree | 0954b94a3c04aadef74de84096fd03c335093cf1 | |
| parent | 538f296696e50470f2db12bdc7a853a470acd82e (diff) | |
Fix keyboard logic.
| -rw-r--r-- | PiTerm.py | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -44,10 +44,10 @@ while True: row_pins[r].value=0 old_row=r for c in range(12): - if (col_pins[c].value==0 and switch_state[r][c]==1): - switch_state[r][c]=0 + if (col_pins[c].value==0 and switch_state[r][c]==0): + switch_state[r][c]=1 print(keymap[r][c]) lcd.message+=keymap[r][c] - if (col_pins[c].value==1 and switch_state[r][c]==0): - switch_state[r][c]=1 + if (col_pins[c].value==1 and switch_state[r][c]==1): + switch_state[r][c]=0 time.sleep(0.01) # debounce |
