RaspberryPI plus LEDBorg plus IFTTT.com = Fun with Lights

||||| 0 Like |||||

So, now my Raspberry Pi us up and running there are several questions as to what I can learn with it. One brilliant add on is called the “LEDBorg” by a British Company PiBorg.

This is simply a three colour LED you can control from the Pi’s GPIO pins. It plugs in over the top of the pins and is simple to use. I won’t cover setup and configuration – for that please see http://www.piborg.com/ledborg

Using the LEDBorg with Gmail and IFTTT.com

Now you have your device all setup and configured head over to the original source for this information : http://kimondo.co.uk/ifttt-blinky-led-with-a-raspberry-pi/(Thanks Pete Taylor).

Some Changes to Pete’s Code

Pete’s code is an excellent starting point, but what more can you do?

This can be downloaded/forked on Gist – https://gist.github.com/vwillcox/5090214#file-gmail-py

I have added the following extra features to the pre-existing code

1) Added If Else loop to check for empty mailbox and turn LED off if no emails
2) Added Section to empty mailbox after using them

So, this will run every 1 minute check for the latest email and light up the appropriate colour. If there are no emails, it will turn the light off for you.

Future Additions

When I get time I will be adding some extra features that will only turn the light off if you have seen it (an email switch can be sent) and if you have multiple alerts since you have last flagged the emails, it will flash all colours as needed (Flash/Fade)

Thanks for reading!

Leave a Reply

Your email address will not be published. Required fields are marked *

Advertisment ad adsense adlogger