|
10 | 10 | using namespace Menu; |
11 | 11 |
|
12 | 12 | //define your keyboard ------------------------------------ |
13 | | -const byte ROWS = 1; //four rows |
| 13 | +const byte ROWS = 4; //four rows |
14 | 14 | const byte COLS = 4; //four columns |
15 | 15 | //define the cymbols on the buttons of the keypads |
16 | | -char hexaKeys[ROWS][COLS] = {{'+','-','*','/'}}; |
17 | | -byte rowPins[ROWS] = {2}; //connect to the row pinouts of the keypad |
18 | | -byte colPins[COLS] = {3,4,5,6}; //connect to the column pinouts of the keypad |
| 16 | +char hexaKeys[ROWS][COLS] = { |
| 17 | + {'1','2','3','A'}, |
| 18 | + {'4','5','6','B'}, |
| 19 | + {'7','8','9','-'}, |
| 20 | + {'/','0','*','+'}, |
| 21 | +}; |
| 22 | +byte rowPins[ROWS] = {6,7,8,9}; //connect to the row pinouts of the keypad |
| 23 | +byte colPins[COLS] = {2,3,4,5}; //connect to the column pinouts of the keypad |
19 | 24 |
|
20 | 25 | //initialize an instance of class NewKeypad |
21 | | -Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); |
| 26 | +Keypad customKeypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS); |
22 | 27 |
|
23 | 28 | //define a menu ----------------------------------------------------- |
24 | 29 | char* constMEM hexDigit MEMMODE="0123456789ABCDEF"; |
@@ -59,4 +64,5 @@ void setup() { |
59 | 64 |
|
60 | 65 | void loop() { |
61 | 66 | nav.poll(); |
| 67 | + delay(100); |
62 | 68 | } |
0 commit comments