I got a Nano Arduino v3.0
I have a programmer USBASP 2.0
I have a matrix keyboard 3x4
Sketch works on serial monitor
I need the PC recognize it as a Keyboard, I need to use it like buttons into another program, like a normal keyboard, for example: if I open NotePad I want to input characters using matrix keyboard and Nano Arduino.
Is it possible?
Full code:
#include <Keypad.h>
const byte ROWS = 4; //four rows
const byte COLS = 3; //four columns
//define the cymbols on the buttons of the keypads
char hexaKeys[ROWS][COLS] = {
{'0','1','2'},
{'4','5','6'},
{'8','9','A'},
{'C','D','E'}
};
byte rowPins[ROWS] = {8,7, 6, 5}; //connect to the row pinouts of the keypad
byte colPins[COLS] = {4, 3, 2}; //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);
}
void loop(){
char customKey = customKeypad.getKey();
if (customKey){
Serial.println(customKey);
}
}