Definition at line 42 of file pir.h.
#include <pir.h>
|
| | Pir (int pin, uint32_t latchMs=5000, uint32_t risingTime=1000, uint32_t fallingTime=1000, const char *button_name=nullptr) |
| |
| void | activate (uint32_t now) |
| | Manually start the latch cycle (e.g. on startup)
|
| |
| bool | detect (uint32_t now) |
| | Returns true if the PIR is “latched on” (within latchMs of last trigger).
|
| |
| uint8_t | transition (uint32_t 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.
|
| |
The documentation for this class was generated from the following files: