chucketn
Senior Citizen
I'm in the process of combining snippets of working sketches into a single sketch
I'm getting an error that 'Keypad' does not name a type.
Funny thing is I copied the keypad info from a working sketch, that compiles and runs. In the new unfinished sketch the line
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, rows, cols);
compiles in one and fails in the other.
I copied the following from the working sketch to the new one. It errors on the new one! Help?
#include <Keypad.h>
const byte rows = 4;
const byte cols = 4;
char keys[rows][cols] = {
{'1','2','3','B'},
{'4','5','6','L'},
{'7','8','9','R'},
{'*','0','#','E'}
};
byte rowPins[rows] = {11,10,9,8};
byte colPins[cols] = {7,6,5,4};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, rows, cols);
Chuck
I'm getting an error that 'Keypad' does not name a type.
Funny thing is I copied the keypad info from a working sketch, that compiles and runs. In the new unfinished sketch the line
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, rows, cols);
compiles in one and fails in the other.
I copied the following from the working sketch to the new one. It errors on the new one! Help?
#include <Keypad.h>
const byte rows = 4;
const byte cols = 4;
char keys[rows][cols] = {
{'1','2','3','B'},
{'4','5','6','L'},
{'7','8','9','R'},
{'*','0','#','E'}
};
byte rowPins[rows] = {11,10,9,8};
byte colPins[cols] = {7,6,5,4};
Keypad keypad = Keypad(makeKeymap(keys), rowPins, colPins, rows, cols);
Chuck