many many thanks for help in my preveious topic,,,
Now i have tested keypad libray with 2x3 matrix using 6 buttons.
actually i want to make my own functioning Usb Midi keyboard with42keys+ 7 function button..
as there is sketch i have tested & modified from inbuilt example,,,,,
#include <Keypad.h> // tested
const byte ROWS = 2; //four rows
const byte COLS = 3; //three columns
char keys[ROWS][COLS] = {
{'1','2','3'},
{'4','5','6'}
};
byte rowPins[ROWS] = {1, 0}; //connect to the row pinouts of the kpd
byte colPins[COLS] = {5, 6, 7}; //connect to the column pinouts of the kpd
Keypad kpd = Keypad( makeKeymap(keys), rowPins, colPins, ROWS, COLS );
void setup() {
Serial.begin(9600);
}
void loop() {
if (kpd.getKeys())
{ for (int i=0; i<LIST_MAX ;i++) {
if (kpd.key[i].stateChanged && (kpd.key[i].kstate == PRESSED))
{
Serial.print("Key ");
Serial.print(kpd.key[i].kchar);
Serial.println("DUBBTA");
}
if (kpd.key[i].stateChanged && (kpd.key[i].kstate == RELEASED))
{
Serial.print("Key ");
Serial.print(kpd.key[i].kchar);
Serial.println("CHDTA ");
}
}
}
} // End loop
here are functions ,which i want to understand and use in my sketch.
(1) if my target matrix 7x7 ,,49buttons, (Button1,Button2,Button3,.......Button49)
then what & where should be change in code???????
(2) in loop function , ( If button1 is pressesd/released ,do this ) and ( if button2 is pressed/released
do that ) what changes for assign diffrent functions from different buttons ?????
(3) if button44 is hold and button45 is pressed , do some different,,,,,......for this operation what changes should be done in code??
please help or hint ,,,,,,,,,,,,thank you