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:
22
include/led_controller.h
Normal file
22
include/led_controller.h
Normal file
@@ -0,0 +1,22 @@
|
||||
#ifndef LED_CONTROLLER_H
|
||||
#define LED_CONTROLLER_H
|
||||
|
||||
#include <Arduino.h>
|
||||
#include <Adafruit_MCP23X17.h>
|
||||
|
||||
class LEDController {
|
||||
private:
|
||||
Adafruit_MCP23X17* mcp1;
|
||||
Adafruit_MCP23X17* mcp2;
|
||||
bool ledStates[20];
|
||||
|
||||
public:
|
||||
LEDController(Adafruit_MCP23X17* mcp1, Adafruit_MCP23X17* mcp2);
|
||||
void init();
|
||||
void setLED(uint8_t ledIndex, bool state);
|
||||
void toggleLED(uint8_t ledIndex);
|
||||
bool getLEDState(uint8_t ledIndex);
|
||||
void updateHardware();
|
||||
};
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user