aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xArduino/ButtonMatrix/ButtonMatrix.pde9
1 files changed, 4 insertions, 5 deletions
diff --git a/Arduino/ButtonMatrix/ButtonMatrix.pde b/Arduino/ButtonMatrix/ButtonMatrix.pde
index 85a9bfa..6ce18f4 100755
--- a/Arduino/ButtonMatrix/ButtonMatrix.pde
+++ b/Arduino/ButtonMatrix/ButtonMatrix.pde
@@ -1,4 +1,4 @@
-#include <Keypad.h> // Needs to be the modified version
+ #include <Keypad.h> // Needs to be the modified version
const byte ROWS = 19;
const byte COLS = 8;
@@ -27,7 +27,7 @@ byte rowPins[ROWS] = {14, 15, 16, 17, 18, 19, 20, 21, 22, 24, 26, 28, 30, 32, 34
the columns are rows and the rows are columns, have fun!
*/
// ROW COL ROWS COLS
-Keypad keypad = Keypad( makeKeymap(testKeysTwo), colPins, rowPins, COLS, ROWS);
+Keypad keypad = Keypad( makeKeymap(keys), colPins, rowPins, COLS, ROWS);
void setup(){
Serial.begin(115200);
@@ -40,7 +40,7 @@ void setup(){
boolean runSerialTest() {
Serial.println("Begining Serial Test");
delay(10);
- byte sByte cByte;
+ byte sByte, cByte;
for (int i=0; i<10000; i++) {
sByte = Serial.read();
if (sByte != cByte && i != 0) return false;
@@ -52,8 +52,7 @@ boolean runSerialTest() {
}
void loop(){
- // Serial.println("GetKeyCall");
- char customKey = customKeypad.getKey();
+ char customKey = keypad.getKey();
int customKeyInt = customKey;
if (customKeyInt < 0) customKeyInt += 256;
if (customKey != NO_KEY){