I've been mulling about doing something like that for blue jays and peanuts to ration out their allotment in a sustainable manner. A family of blue jays (or most birds in the Crow [Corvidae] family) will rapidly hoard whatever you give them and finish off a large pile of peanuts within hours. Unlike other birds that also visit the pile of peanuts I leave out, they have no intentions of eating most of those peanuts as they take them and just stash them for later (similar to a squirrel).
The other problem is allocating peanuts to other birds (chickadees, nuthatches, cardinals, etc) while not giving too many to the blue jays. However, there's a project I ran across from CalTech that can determine the type of bird in front of a camera via computer vision[1][2][3]. Not sure why the creator of the squirrel project used a camera though when a cheaper, more robust sensor would work unless he was eventually thinking of extending its usage for more than simple motion detection.
Creator here, I used a camera so that I would have video of everything that is happening. As seen in the follow-up post [1], I rebuilt the system so that the nut-release is triggered by a proximity sensor. The camera only records now.
If anyone else has used motion on a Raspberry Pi, have you have any issues staying connected to wi-fi? I was running motion on my Raspberry Pi, trying to do something similar, and found that within 24 hours the wifi module would disconnect and stay down. I would have to reboot.
Without having motion running, I can stay connected to wifi for weeks at a time with the same pi/router/network. I haven't found a solution for this yet.
I actually started down the path of getting making cron restart the wlan interface every 24 hours but I ran into some issues and gave up on it. I suppose rebooting the whole machine would also work :) May do that as a short term fix.
I will have to try again to figure out why this is happening, there must be an explanation.
I was almost embarrassed to post that simple minded solution. So thanks for posting that one. I am prone to forget that sometimes, stupidly simple is best.
PS to OP. You might need to fiddle with /etc/sudoers in order that cron can be allowed to reboot the machine.
The other problem is allocating peanuts to other birds (chickadees, nuthatches, cardinals, etc) while not giving too many to the blue jays. However, there's a project I ran across from CalTech that can determine the type of bird in front of a camera via computer vision[1][2][3]. Not sure why the creator of the squirrel project used a camera though when a cheaper, more robust sensor would work unless he was eventually thinking of extending its usage for more than simple motion detection.
[1] http://vision.caltech.edu/visipedia/20q.html
[2] http://vision.caltech.edu/visipedia/ipadapp.html
[3] https://github.com/welinder/cubam