Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <FastLED.h>
- #define NUM_LEDS 1
- #define DATA_PIN D0
- CRGB leds[NUM_LEDS];
- void setup() {
- FastLED.addLeds<WS2812B, DATA_PIN, RGB>(leds, NUM_LEDS);
- FastLED.clear(true); // vyresilo cely problem pridani tohoto radku!
- leds[0] = 0x202020; // ma byt bilá, cili RGB ale sviti pouze RG !
- FastLED.show();
- delay(2000);
- }
- void loop() {
- leds[0] = 0x200000; // Red OK
- FastLED.show();
- delay(500);
- leds[0] = 0x002000; // Green OK
- FastLED.show();
- delay(500);
- leds[0] = 0x000020; // Blue OK
- FastLED.show();
- delay(500);
- leds[0] = 0x202020; // White OK
- FastLED.show();
- delay(500);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement