21 Pir(
int pin,
const char* button_name =
nullptr);
49 uint32_t latchMs = 5000,
50 uint32_t risingTime = 1000,
51 uint32_t fallingTime = 1000);
Pir(int pin, const char *button_name=nullptr)
void activate(uint32_t now)
Manually start the latch cycle (e.g. on startup)
PirAdvanced(int pin, uint32_t latchMs=5000, uint32_t risingTime=1000, uint32_t fallingTime=1000)
uint8_t transition(uint32_t now)
Returns a 0–255 ramp value: • ramps 0→255 over risingTime • holds 255 until latchMs–fallingTime • ram...
bool detect(uint32_t now)
Returns true if the PIR is “latched on” (within latchMs of last trigger).
Implements the FastLED namespace macros.
Implements a simple red square effect for 2D LED grids.