aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--PiTerm.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/PiTerm.py b/PiTerm.py
index cd24fb4..b35f0d7 100644
--- a/PiTerm.py
+++ b/PiTerm.py
@@ -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