I tried another program with the PIR, this time I worked on moving averages to compute the mean number of detections and the mean time people spend in front of the PIR. The goal is to use it to give to the object a deeper consciousness of its environment (ability to detect moments such as rush hours or very passing places).
I started to have memory issues (only 1k on the ATtiny!!!) and I think it will put a sad break to using those chips for doing this kind of "advanced" stuff (statistics, adaptivity, floating point operations, etc).
Anyway here is the code.
| Attachment | Size |
|---|---|
| detectStats.c | 2.6 KB |