This sketch is fully compatible with the FastLED web compiler.
This sketch is fully compatible with the FastLED web compiler. To use it do the following:
- Install Fastled:
pip install fastled
- cd into this examples page.
- Run the FastLED web compiler at root:
fastled
- When the compiler is done a web page will open.
#include <Arduino.h>
#if SKETCH_HAS_LOTS_OF_MEMORY
#define WIDTH 22
#define HEIGHT 22
#else
#define WIDTH 12
#define HEIGHT 12
#endif
#define NUM_LEDS (WIDTH * HEIGHT)
#define BLUR_AMOUNT 172
#define DATA_PIN 2
#define BRIGHTNESS 255
#define SERPENTINE true
Serial.println("setup");
}
uint8_t r = random(255);
uint8_t g = random(255);
uint8_t b = random(255);
}
delay(20);
}
XYMap xymap(WIDTH, HEIGHT, SERPENTINE)
FL_DISABLE_WARNING_PUSH FL_DISABLE_WARNING_GLOBAL_CONSTRUCTORS CFastLED FastLED
Global LED strip management instance.
central include file for FastLED, defines the CFastLED class/object
WS2812B controller class.
void blur2d(CRGB *leds, fl::u8 width, fl::u8 height, fract8 blur_amount, const fl::XYMap &xymap)
Two-dimensional blur filter.
@ GRB
Green, Red, Blue (0102)
#define EVERY_N_MILLISECONDS(N)
Alias for EVERY_N_MILLIS.
Representation of an RGB pixel (Red, Green, Blue)