From a4dc08f747761331b03527485ee6e792198f9b6b Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 1 Sep 2011 10:07:21 +0100 Subject: Fixed a few errors arising from the code clean up, this revision now should compile and run correctly (apart from the untested serial test bit). --- Arduino/ButtonMatrix/ButtonMatrix.pde | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'Arduino') 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 // Needs to be the modified version + #include // 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){ -- cgit v1.2.3