FastLED 3.9.15
Loading...
Searching...
No Matches
fl::Pir Class Reference

Detailed Description

Examples
FxNoiseRing.ino.

Definition at line 38 of file pir.h.

#include <pir.h>

+ Collaboration diagram for fl::Pir:

Public Member Functions

 Pir (int pin, u32 latchMs=5000, u32 risingTime=1000, u32 fallingTime=1000, const char *button_name=nullptr)
 
void activate (u32 now)
 Manually start the latch cycle (e.g. on startup)
 
bool detect (u32 now)
 Returns true if the PIR is “latched on” (within latchMs of last trigger).
 
u8 transition (u32 now)
 Returns a 0–255 ramp value: • ramps 0→255 over risingTime • holds 255 until latchMs–fallingTime • ramps 255→0 over fallingTime Outside latch period returns 0.
 

Private Attributes

UIButton mButton
 
bool mLastState = false
 
PirLowLevel mPir
 
TimeRamp mRamp
 

The documentation for this class was generated from the following files: