Trying to get statistics with PIR/ATtiny

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.

AttachmentSize
detectStats.c2.6 KB

Reply

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.