Make it work or some shit

This commit is contained in:
Maximilian Friedersdorff 2025-10-25 23:32:57 +01:00
parent a182a4f7da
commit 8136e6499c

View file

@ -1,10 +1,12 @@
char n_buttons = 7; char n_buttons = 7;
char button_pins[] = {0, 1, 2, 3, 4, 5, 6}; char button_pins[] = {0, 1, 2, 3, 4, 5, 6};
char pin_state[] = {HIGH, HIGH, HIGH, HIGH, HIGH, HIGH, HIGH}; 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'}, {'1'},
{'2'}, {'2'},
{'3'}, {'3'},
@ -21,7 +23,7 @@ void setup() {
for (int i = 0; i < n_buttons; ++i) { for (int i = 0; i < n_buttons; ++i) {
pinMode(button_pins[i], INPUT_PULLUP); 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) { 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]; char len = sequence_length[button_i];
if (sequence_length[button_i] == 1) { if (sequence_length[button_i] == 1) {