Atm_led_WS2812.h 600 B

1234567891011121314151617181920212223242526272829303132333435
  1. /*
  2. * Atm_led_mcp.h
  3. *
  4. * Created on: 09.12.2017
  5. * Author: ian
  6. */
  7. #ifndef ATM_LED_WS2812_H_
  8. #define ATM_LED_WS2812_H_
  9. #include "FastLED.h"
  10. #include <Atm_led.hpp>
  11. class Atm_led_WS2812: public Atm_led {
  12. public:
  13. Atm_led_WS2812(CRGB& _leds );
  14. Atm_led_WS2812& setMinMax(int min, int max);
  15. Atm_led_WS2812& setHueSat(int hue, int sat);
  16. private:
  17. CRGB& leds;
  18. int current_level;
  19. int pwm_min, pwm_max = 65535 ;
  20. CHSV color ;
  21. protected:
  22. virtual void initLED();
  23. virtual void switchOn();
  24. virtual void switchOff();
  25. virtual void setBrightness(int value);
  26. };
  27. #endif /* SRC_ATM_LED_MCP_H_ */