2021-08-29 17:00:30 +08:00
|
|
|
#include <Arduino.h>
|
|
|
|
#include <Ticker.h>
|
|
|
|
|
|
|
|
#define STATUS_LED_PIN 2
|
|
|
|
|
2022-07-02 13:04:34 +08:00
|
|
|
class StatusLed
|
2021-08-29 17:00:30 +08:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
Ticker flipper;
|
|
|
|
|
|
|
|
public:
|
|
|
|
enum BlinkRate {
|
|
|
|
RateAlwaysOn,
|
2021-08-29 22:14:08 +08:00
|
|
|
Rate5Hz,
|
2021-08-29 17:00:30 +08:00
|
|
|
Rate2Hz,
|
|
|
|
Rate0_5Hz,
|
|
|
|
RateAlwaysOff,
|
|
|
|
};
|
2022-07-02 13:04:34 +08:00
|
|
|
StatusLed();
|
2021-08-29 17:00:30 +08:00
|
|
|
void SetBlinkRate(BlinkRate rate);
|
|
|
|
};
|