The code is adapted from this post: http://talktech.info/2013/03/05/raspberrypi-plus-ledborg-plus-ifttt-com-fun-with-lights/



From the console window enter the following commands:



wget https://googledrive.com/host/0By6W2xwV2whWeDdWZjFPRWdqcTA/medal.py

chmod +x medal.py

nano medal.py



You should then be greeted with the nano screen. Just change youremail@gmail.com and password to your Gmail credential.

Press CTRL + X then y then Enter



To check if everything worked, just write sudo ./medal.py.



If you get an error, you may need to install python dependencies or check your email adress:



To install Python:

sudo apt-get install python

sudo apt-get install python-dev

sudo apt-get install python-setuptools

sudo apt-get install python-pip

sudo easy_install -U distribute

sudo pip install email



Next we need to run this code periodically

Write the following lines to have your Pi check for medals every 5 minutes:

sudo crontab -e

and add this line before saving:

/5 * * * * sudo /path/to/medal.py



Phew, that was a lot of writing :)