18#define MATRIX_WIDTH 100
19#define MATRIX_HEIGHT 100
20#define NUM_LEDS (MATRIX_WIDTH * MATRIX_HEIGHT)
22#define LED_TYPE WS2812B
23#define COLOR_ORDER GRB
27#define MATRIX_SERPENTINE true
36UIDescription description(
"Use the xPosition slider to see the ease function curve. Use the Ease Type dropdown to select different easing functions. Use the 16-bit checkbox to toggle between 16-bit (checked) and 8-bit (unchecked) precision.");
77 Serial.println(
"FastLED Ease16InOutQuad Demo - Simple Curve Visualization");
105 uint8_t
x = map(sliderValue * 1000, 0, 1000, 0,
MATRIX_WIDTH - 1);
113 uint16_t easeInput = map(sliderValue * 1000, 0, 1000, 0, 65535);
114 uint16_t easeOutput =
ease16(selectedEaseType, easeInput);
118 uint8_t easeInput = map(sliderValue * 1000, 0, 1000, 0, 255);
119 uint8_t easeOutput =
ease8(selectedEaseType, easeInput);
EaseType getEaseType(int value)
LedsXY< MATRIX_WIDTH, MATRIX_HEIGHT > leds
UITitle title("EaseInOut")
UIDropdown easeTypeDropdown("Ease Type", easeOptions)
UIDescription description("Use the xPosition slider to see the ease function curve. Use the Ease Type dropdown to select different easing functions. Use the 16-bit checkbox to toggle between 16-bit (checked) and 8-bit (unchecked) precision.")
UICheckbox use16Bit("16-bit", true)
UISlider xPosition("xPosition", 0.0f, 0.0f, 1.0f, 0.01f)
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
CLEDController * controller
#define FL_ASSERT(x, MSG)
static XYMap constructSerpentine(u16 width, u16 height, u16 offset=0)
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
void clear(CRGB(&arr)[N])
u16 ease16(EaseType type, u16 i)
u8 ease8(EaseType type, u8 i)
@ White
<div style='background:#FFFFFF;width:4em;height:4em;'></div>