I have got a TM1638 Module and everything works fine so far, but the main reason why I bought it was because it would make a nice additional keyboard for repetetive tasks.
This function gives me the buttons as a HEX number, i.e. 1 for the first, 2 for the second, 4 for the third and so on up to 128.
#include <TM1638.h>
TM1638 module(4,5,6);
void setup() {
}
void loop() {
byte keys = module.getButtons();
}
When displayed as a binary value it exactly represents the buttons as they are pressed, without leading zeros.
My Question now is: How would I assign keys to the HEX or BIN number with the keyboard library?