I need a way for the microcontroller to know when it's really dark and when it isn't. Sort of like in a regular light switch you use for your driveway lights.
Now, the issue is that that without some data filtering, stuff like a passing car at night, a fly landing on the sensor during the day etc. will full the thing.
At the moment I'm loading 60 readings into an array, once every second, and then I'm counting how many "dark" readings I got, but that doesn't seem very efficient as far as memory goes. Anyone has a better way?