Make it work or some shit
This commit is contained in:
parent
a182a4f7da
commit
8136e6499c
1 changed files with 6 additions and 4 deletions
|
|
@ -1,10 +1,12 @@
|
|||
|
||||
|
||||
char n_buttons = 7;
|
||||
char button_pins[] = {0, 1, 2, 3, 4, 5, 6};
|
||||
char pin_state[] = {HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH};
|
||||
|
||||
char modKey = KEY_LEFT_CTRL;
|
||||
char modKey = (char) KEY_LEFT_CTRL;
|
||||
|
||||
int buttons[7][6] = {
|
||||
char buttons[7][6] = {
|
||||
{'1'},
|
||||
{'2'},
|
||||
{'3'},
|
||||
|
|
@ -21,7 +23,7 @@ void setup() {
|
|||
for (int i = 0; i < n_buttons; ++i) {
|
||||
pinMode(button_pins[i], INPUT_PULLUP);
|
||||
}
|
||||
Keyboard.begin()
|
||||
Keyboard.begin();
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -39,7 +41,7 @@ void loop() {
|
|||
|
||||
|
||||
void set_button_state(int button_i, char state) {
|
||||
int *sequence = buttons[button_i];
|
||||
char *sequence = buttons[button_i];
|
||||
char len = sequence_length[button_i];
|
||||
|
||||
if (sequence_length[button_i] == 1) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue