first commit

This commit is contained in:
TemanSv1n
2025-12-02 18:52:45 +03:00
commit bdda481bff
202 changed files with 73723 additions and 0 deletions

View File

@@ -0,0 +1,28 @@
#include "ButtonPullup.h"
namespace simplebutton {
ButtonPullup::ButtonPullup() {
setup(255);
}
ButtonPullup::ButtonPullup(uint8_t pin) {
setup(pin);
}
ButtonPullup::~ButtonPullup() {}
void ButtonPullup::setup(uint8_t pin) {
this->button_pin = pin;
this->button_inverted = true;
enable();
}
void ButtonPullup::enable() {
button_enabled = true;
if ((button_pin < 255) && !button_setup) {
pinMode(button_pin, INPUT_PULLUP);
button_setup = true;
}
}
}