Hi, I've built a Dactyl Manuform 6x6 wired it up with a couple of Nice!Nano V2 and that project is great and working as it should do, fully programmed to my keyboard layout.
Today I'm trying to make a matching NUMBERPAD with ARROWS and the Control keys (pg up ins etc) but using an Arduino Uno clone from HobbyShop.
I've wired it up and tested everything with a multi-meter and all of the switches are working as they should do.
I've got the Arduino software on my PC and can program it with the Blink Demo, then reflash it with something else and then back again. So that part works.
I'm using the NumberPad example, but I cannot for the life of me figure out how to get it to see my keypresses.
I even tied in the Blink code with the key presses code just to make sure that it had flashed correctly, and it blinks to the value I set the light for.
Any help would be greatly appreciated.
#include <Keypad.h>
const byte ROWS = 4; //four rows
const byte COLS = 4; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{'0','1','2','3'},
{'4','5','6','7'},
{'8','9','A','B'},
{'C','D','E','F'}
};
byte rowPins[ROWS] = {5, 4, 3, 2}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {9, 8, 7, 6}; //connect to the column pinouts of the keypad
//initialize an instance of class NewKeypad
Keypad customKeypad = Keypad( makeKeymap(hexaKeys), rowPins, colPins, ROWS, COLS);
void setup(){
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
}
void loop(){
//digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
//delay(200); // wait for a second
//digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
//delay(200); // wait for a second
char customKey = customKeypad.getKey();
if (customKey){
Serial.println(customKey);
}
}