delay(1000);
}
else if (button != 0)
{
if (button == '0') {//note that this is a keypad '0' not the button press itself
Keyboard.write('0');
}
else if (button == '1') {
Keyboard.write('1');
}
else if (button == '2') {
Keyboard.write('2');
}
else if (button == '3') {
Keyboard.write('3');
}
else if (button == '4') {
Keyboard.write('4');
}
else if (button == '5') {
Keyboard.write('5');
}
else if (button == '6') {
Keyboard.write('6');
}
else if (button == '7') {
Keyboard.write('7');
}
else if (button == '8') {
Keyboard.write('8');
}
else if (button == '9') {
Keyboard.write('9');
}
else if (button == '#') {
Keyboard.write('#');
}
else if (button == '*') {
Keyboard.write('*');
}
}
//Do something else. Don't call your Keypad a ton otherwise you'll tie up the I2C bus
delay(25); //25 is good, more is better
}
If you have a text editor (Notepad, Word, TextEdit, etc.) open and active from Example 2, press a button on the
Qwiic Keypad. Or you can try using the textbox below to test. The outputs should be associated with each of the
Qwiic keypad button press.
SparkFun Qwiic Pro Micro USB C Test Area