Introduction: Flag E-mail Notifier Using Intel-Edison
In this project, we will see how to make a physical Mail-Notifier using Intel Edison
This project is supported by BAL-IoTLAB(www.iotlab.in)
Step 1: Edison Setup
First you need to have Yocto OS on Intel-Edison(I havnt tried this on Ubilinux),
Here is how you can flash Edison with Yocto OS:
1.Download and Unzip Yocto Image file from : http://downloadmirror.intel.com/24389/eng/edison-...
2.Then download and double unzip dfutils from : http://downloadmirror.intel.com/24389/eng/edison-...
3.Now copy all the contents in the extracted folder of dfutils/win32-mingw32 to the extracted folder of yoctoImage/ and paste it.
4.Run flashall.bat and follow the instructions on the screen.
After you are done with flashing yocto on Edison, now
1.Connect to Edison via Serial terminal, by connecting the Serial on Edison to your PC.
2.Then start a Serial session using Putty(windows), or Screen(linux).
3.Now execute "vi /etc/opkg/base-feeds.conf"
4.then add :
src/gz all http://repo.opkg.net/edison/repo/all
src/gz edison http://repo.opkg.net/edison/repo/all
src/gz core2-32 http://repo.opkg.net/edison/repo/all
These lines into base-feeds.conf 5.Now execute "opkg update"
6.Then you can download most of the software like 'git', 'nano', 'tmux', 'upm', 'mraa' etc.
7.If you are not planning to use any external storage on Edison, then please dont execute 'opkg upgrade', as it drinks up all the space on Edison.
Step 2: Setting Up Environment for Mail-notifier
Now you have 'Check Allow less secure apps on your gmail account', so that the IMAPClient library can sign into your Account and keep track of your NEW MAILS.
Installing IMAPClient library on your Edison: 1.Download and extract the IMAPClient library given below. 2.Push the extracted file to your Edison using SCP(linux), winSCP(windows). 3.cd into your folder on Edison. 4.Then execute 'python setup.py install'.
Now Your Edison is completly setup and ready to Run Mail-Notifier.
Step 3: Working
Now lets make the Hardware connections on Edison:
1.Connect Servo motor signal pin to any of the PWM enabled pin on Arduino Extension Board(I've used Pin 3).
2.You can identify a PWM pin on Edison by looking at the (~)tilde sign next to the pin Number on Arduino extension Board.
Running Mail-notifier.py 1.Download the mail-notifier.py code given below. 2.And run 'python mail-notifier.py', whereever you have copied the downloaded mail-notifier.py on your Edison. Working: Here we will be using a python IMAPClient library, which will check the UNREAD mails for every minute, if it finds any UNREAD mail in the INBOX, then the Flag is thrown up by turning the servo upto 90 degrees. When all the mails are MARKED as SEEN then the Flag is down. In the code you can alter the frequency for checking the mails, also you raise the flag only if you get a mail from a particular person. Also you can use other actuators for indicating UNSEEN mails, for ex: Leds, Buzzer etc. For more Information and options about IMAPClient library refer : https://imapclient.readthedocs.io/en/stable/