12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #include <Atm_led_WS2812.h>
- #include <Atm_led.hpp>
- Atm_led_WS2812::Atm_led_WS2812(CRGB& _leds ):
- Atm_led(),
- leds(_leds) {
-
- }
- void Atm_led_WS2812::initLED() {
- leds = CRGB::White;
- FastLED.show() ;
-
- }
- void Atm_led_WS2812::switchOn() {
- leds = CRGB( 0, 255, 255);
-
-
-
- FastLED.show() ;
- }
- void Atm_led_WS2812::switchOff() {
- leds = CRGB::Black ;
- FastLED.show() ;
- }
- void Atm_led_WS2812::setBrightness(int r, int g, int b) {
- leds = CRGB( 50, 100, 150);
-
-
-
- FastLED.show() ;
- }
|