Hello. I connect 3 line, and 4 column keypad to arduino. I have Changes in Digits. I decided that error applies byte rowpins, and byte colpins. I correct this, However i see error :too many initalizers for char[3][4]. I don't have idea how to correct this. Please for help.
Ps. Sorry for my language, I don't good Know with English Language. Thanks for help.
My code:
#include <Keypad.h> //library
const byte ROWS = 3;
const byte COLS = 4;
byte rowPins[ROWS] = { 4, 3,2,};
byte colPins[COLS] = {5,6, 7, 8,};
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'},
{'7','8','9'},
{'*','0','#'}
};
Keypad keyboardw = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup(){
Serial.begin(9600);
}
void loop(){
char key = keyboardw.getKey();
if (key){
Serial.println(key);
}
}