29#define COLOR_ORDER GRB
33#define PIR_LATCH_MS 60000
34#define PIR_RISING_TIME 1000
35#define PIR_FALLING_TIME 1000
54 if (Serial.available()) {
55 char input = Serial.read();
58 }
else if (input ==
'1') {
74 pir.activate(millis());
78 double angle_offset = double(now) / 32000.0 * 2 * M_PI;
82 float angle = i * 2 * M_PI /
NUM_LEDS + angle_offset;
85 x *= 0xffff *
scale.as<
double>();
86 y *= 0xffff *
scale.as<
double>();
89 uint16_t noise3 =
inoise16(
x,
y, 0xffff + now);
91 int16_t noise4 = map(noise3, 0, 255, -64, 255);
106 uint8_t bri =
pir.transition(millis());
CFastLED FastLED
Global LED strip management instance.
central include file for FastLED, defines the CFastLED class/object
uint8_t noise[NUM_LAYERS][WIDTH][HEIGHT]
uint8_t noise2[NUM_LAYERS][WIDTH][HEIGHT]
XYMap xyMap(HEIGHT, WIDTH, SERPENTINE)
UISlider brightness("Brightness", 255, 0, 255, 1)
UISlider scale("Scale", 4,.1, 4,.1)
PirAdvanced pir(PIN_PIR, PIR_LATCH_MS, PIR_RISING_TIME, PIR_FALLING_TIME)
void handleSerialDither()
UISlider timescale("Time Scale", 1,.1, 10,.1)
CLEDController * controller
UISlider timeBitshift("Time Bitshift", 5, 0, 16, 1)
UICheckbox useDither("Use Binary Dither", true)
UISlider brightness("Brightness", 1, 0, 1)
Base definition for an LED controller.
static ScreenMap Circle(int numLeds, float cm_between_leds=1.5f, float cm_led_diameter=0.5f)
#define BINARY_DITHER
Enable dithering using binary dithering (only option)
#define DISABLE_DITHER
Disable dithering.
@ TypicalLEDStrip
Typical values for SMD5050 LEDs.
uint16_t inoise16(uint32_t x, uint32_t y, uint32_t z, uint32_t t)
16-bit, fixed point implementation of Perlin's noise.
#define EVERY_N_SECONDS(N)
Checks whether to execute a block of code every N seconds.
Implements a simple red square effect for 2D LED grids.
Noise generation classes.
Representation of an HSV pixel (hue, saturation, value (aka brightness)).
Representation of an RGB pixel (Red, Green, Blue)