Pages

Monday, July 22, 2013

Fun with Raspberry PI

Its been several years since assembling those cassette players to make a few bucks! The sight of a Raspberry Pi (gifted to them by our CTO!) at our pantry where a couple of guys had connected it to the TV got me curious to start looking at it.

A little reading and I realized it was a computer and it had GPIO. Several years I had kick started stuff on GPIOs and then stopped due to the relatively huge cost of the GPIO chips but now here is a computer with a GPIOs!

So, ordered one and couldn't wait it to arrive.

Day 1: Loaded linux onto it and started working it furiously to get my first home security system to be done. Wrote a piece of code (well I think I should say copied here) in Python to interact with www.privateeyepi.com. All this does it read a particular GPIO pin. If the values changes it updates www.privateeyepi.com which in turn sends out an email (all for free). If you have access to a sms gateway you could add an sms feature as well!

Day 2: After tasting some sucess on Day 1, I decided to move onto some home automation! What if I could switch on lights at home from anywhere in the world. Not sure of the practical usefulness but sounds cool? So, now got the Web2Py framework on Pi. Tested the connectivity from a mobile, ordered a 5 channel remote to be able to switch on/off appliances) and off to catch some sleep

Day 6: Connected the PI to the remote to simulate on/off by using the GPIOs and now I an switch on/off appliances through the web!

Day 7:  Managed to connect an old USB camera to the PI. Played around with OpenCV for facial recognition. Able to recognize faces (not identify them yet). Ordered the camera module for the PI and the goal is to be able greet / shoo off visitors using facial recognition!

I have not pasted code here since all the above is available as open source on the net, feel free to ping me for help!