Implementiere USB-MIDI-Controller für Arduino Pro Micro mit Hardware- und Software-Architektur, einschließlich Button- und LED-Steuerung, Multiplexer-Integration und MIDI-Kommunikation.

This commit is contained in:
2025-07-19 15:46:14 +02:00
parent f6cbffe217
commit e64048e99b
13 changed files with 820 additions and 11 deletions

25
include/button_handler.h Normal file
View File

@@ -0,0 +1,25 @@
#ifndef BUTTON_HANDLER_H
#define BUTTON_HANDLER_H
#include <Arduino.h>
#include <Adafruit_MCP23X17.h>
class ButtonHandler {
private:
Adafruit_MCP23X17* mcp1;
Adafruit_MCP23X17* mcp2;
bool buttonStates[20];
bool lastButtonStates[20];
unsigned long lastDebounceTime[20];
public:
ButtonHandler(Adafruit_MCP23X17* mcp1, Adafruit_MCP23X17* mcp2);
void init();
void update();
bool isPressed(uint8_t buttonIndex);
bool wasPressed(uint8_t buttonIndex);
bool wasReleased(uint8_t buttonIndex);
};
#endif