aboutsummaryrefslogtreecommitdiff
path: root/Arduino
diff options
context:
space:
mode:
authorChristopher Baines <cbaines8@gmail.com>2011-09-01 10:07:21 +0100
committerChristopher Baines <cbaines8@gmail.com>2011-09-01 10:07:21 +0100
commita4dc08f747761331b03527485ee6e792198f9b6b (patch)
treef6347c2e8b30ed07210d3d7e9a7075fe26df2d70 /Arduino
parent96654ea19b12be4b43230f3ff9f908eebcb416ca (diff)
downloadpunchingbag-a4dc08f747761331b03527485ee6e792198f9b6b.tar
punchingbag-a4dc08f747761331b03527485ee6e792198f9b6b.tar.gz
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).
Diffstat (limited to 'Arduino')
-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){