Raspberry Pi Powered Tweetcam

CFD0N9tUkAEt2L-Earlier this spring, my wife and I bought some nice hanging flower planters to spruce up our front porch.  It turns out that we weren’t the only ones that liked it.  A pair of house fenches found it perfect to setup a nest and some eggs!  Coincidentally, I had recently purchased a Raspberry Pi 2 and was brainstorming some ideas for potential projects.  The covered location of our porch, availability of power, and adequate wifi range all but screamed potential!  Setting up a webcam peering into the nest to observe them hatch was the obvious direction to go in.  I considered various streaming and web accessible options before coming up with the idea of making it social media powered thru Twitter.

The basic premise wasCGcPdw2UQAAdfSX that setup a twitter account for the Raspberry Pi to have access to.  The Pi would constantly monitor the Twitter stream for a specific hashtag, #tweet4tweets, to be used.  If it detected someone using this hashtag, it would fire off a pic from the webcam and then upload it to it’s twitter account.  Over the course of this project, I had several hardware and software improvements. First off, I swapped out an old Microsoft Lifecam brand webcam for a brand spankin’ new camera designed to be used with the Pi itself.  This was a seriously awesome improvement.  Not only could the image be of a much higher resolution and better performance in extreme lighting conditions, it was far more customizable in the code as well.  Included in some of the software upgrades, the Pi twitter account would give a shoutout to the person who used the hashtag, by mentioning their username with the pic they initiated.  With a little bit of python wizardry from my neighbor, we even had the Pi self adjusting the light settings based on sunrise/ sunset!

CGlLq-NWQAAz28UAfter a couple of weeks, the eggs hatched (3 out of original 4) and they gradually began leaving the nest.  I was determined to get some of this awesome action on video. Unfortunately, I did not have the time to setup the Pi video capture to be autonomous or triggered via Twitter, so I had to operate it manually.  I sat on my porch manually taking footage several minutes at a time (didnt want to fill up the SD card and miss it), hoping to capture the event of the last bird leaving the nest.  Every single time the parents flew over to encourage the birdie to leave, I would start the recording.  He would perch himself on the edge of the nest and reconsider. Perch himself on the edge of the nest and reconsider. He did this at least 6 or 7 times while I was sitting there!  His two siblings were egging him on from a nearby branch every time.. for over an hour. Finally, I decided to provide him with a small bit of encouragement myself.  So his folks flew over to give him another pep talk and I hit record again.  And just like every time before, he courageously hopped on the side of nest. I quickly stood up from my statue-like position and clapped.  Apparently, this was enough of a jolt to make him forget his fear of flight and hopped right out!  He flew off to join his family with no problems whatsoever!

This was a great opportunity to play with new geeky hardware and quite a learning experience.  Hopefully before long I can incorporate what I gathered from this project into another chance to view some wildlife of the furry mammal variety, but this time in my backyard… 🙂