Atm_led_TLC.h 591 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * Atm_led_mcp.h
  3. *
  4. * Created on: 09.12.2017
  5. * Author: ian
  6. */
  7. #ifndef ATM_LED_TLC_H_
  8. #define ATM_LED_TLC_H_
  9. #include "Adafruit_TLC59711.h"
  10. #include <Atm_led.hpp>
  11. class Atm_led_TLC: public Atm_led {
  12. public:
  13. Atm_led_TLC(Adafruit_TLC59711& _tlc);
  14. Atm_led_TLC& setMinMax(int min, int max);
  15. private:
  16. Adafruit_TLC59711& tlc;
  17. int current_level;
  18. int pwm_min, pwm_max = 65535 ;
  19. protected:
  20. virtual void initLED();
  21. virtual void switchOn();
  22. virtual void switchOff();
  23. virtual void setBrightness(int value);
  24. virtual int mapLevel(int level);
  25. };
  26. #endif /* SRC_ATM_LED_MCP_H_ */