wip with light and mqtt working

This commit is contained in:
2025-08-03 00:34:05 +02:00
parent 8a0c502dae
commit f5fff82fad
9 changed files with 502 additions and 6 deletions

18
lib/pin/pin.h Normal file
View File

@@ -0,0 +1,18 @@
#pragma once
class Pin {
public:
Pin(int pinNumber, bool isOutput = true, bool isLed = false, uint32_t ledFrequency = 5000, uint8_t ledChannel = 0);
void setHigh();
void setLow();
void setLedLevel(uint32_t level);
bool read();
int getPinNumber() const;
bool isOutput() const;
private:
uint8_t ledChannel = 0; // LED channel for PWM
uint8_t pinNumber;
bool output;
bool isLed = false; // Flag to indicate if this pin is used for LED control
};