Biblioteka LEDController.
Diff: LEDController.h
- Revision:
- 0:4001e6959177
diff -r 000000000000 -r 4001e6959177 LEDController.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/LEDController.h Thu Dec 02 21:07:04 2021 +0000 @@ -0,0 +1,24 @@ +#ifndef MBED_LEDCONTROLLER_H +#define MBED_LEDCONTROLLER_H + +#include "mbed.h" + +class LEDController{ + private: + DigitalOut Dout; + Ticker flipper; + float flashPeriod; + bool blinkingMode; + bool shouldBeOn; + + public: + LEDController(PinName pin, float flashPeriod, bool blinkingMode, bool shouldBeOn); + + void toggleBlinkingMode(); + void toggleShouldBeOn(); + bool getBlinkingMode(); + void checkOnOffState(); + void flipperFunction(); +}; + +#endif \ No newline at end of file