AwesomeStudioPedal
A programmable, multi-profile foot controller for DAWs, score readers, and studio automation
Loading...
Searching...
No Matches
nrf52840/src/button_controller.cpp
Go to the documentation of this file.
1#include "button_controller.h"
2
3ButtonController::ButtonController(uint8_t pin) : pin(pin) {}
4
5void ButtonController::setup() { pinMode(pin, INPUT_PULLUP); }
6
8{
9 return digitalRead(pin) == LOW; // Active low due to pull-up
10}
ButtonController(uint8_t pin)
Constructs a ButtonController for a specific GPIO pin.
virtual void setup() override
Initializes the GPIO pin for button input.
virtual bool read() override
Reads the current button state.