Introduction: Arduino Servo Gmail Notifier

Picture of Arduino Servo Gmail Notifier

Hello everybody.

The purpose of this project is to build an Arduino servo gmail notifier. It is a simply and easy to build project for your gmail inbox. The base will be an arduino with a sub-micro servo.

Every time that you have new e-mails the servo will move to notify you and after you read them, it will return to the previous position.

Lets start with the list of the hardware we need for this fun project.

Step 1: List of Hardware

Picture of List of Hardware

We need the following items:

1.An Arduino. (i used a Yun) Buy an arduino

2.A sub-micro servo. (i used a Hitec HS-55) Buy a sub-micro servo

3.A pc. (I used my laptop with Linux. This project works also fine with Windows & Mac)

4.A white piece of paper & a pen

5.Liquid glue (i used a very strong super adhesive from Holland) Super glue

6.An old floppy disk (Probably somewhere in a closet or a drawer or inside an old pc)

7.3 jumper cables male-to-maleJumper cables

Lets go now to the next step and install all the software to the pc.

Step 2: Software.

Picture of Software.

List of software:

1. Arduino IDE (go and download it from here Arduino IDE. I used version 1.6.0 and if you want to work you have to install 1.5.4 and above due to the servo library).

2.Pyserial (go and download it from here Pyserial 2.7.)

3.Python 2.7 (go and download it from here Python 2.7 / Python for Windows / Python for Mac OS

4.Ardumail (go and download it from here Ardumail) When u download the zip you will find 4 files inside.The arduino.ino code, the ardumail.py and two text files. Extract only the ardumail.py

Lets go now and start build our notifier.

Step 3: Build the Notifier

Picture of Build the Notifier

Ok lets start building our notifier:

Step one: Take the old floppy drive and tear it down to its pieces. Put the plastics to a recycle bin and hold the metallic parts. Take and use the one that fits to your servo. Probably it will not be like my own but you can modify it anyway.

Step two: Take the glue and attach the servo to the metallic part of the floppy . Hold it for a couple of minutes.

Step three: Cut the white paper so it can fits to the metallic part and make a hole for the servo.

Step four: Apply the head for your servo from the horn set. I used the biggest.

*Notice: don't write nothing to the paper before you test it.

Step 4: Connect the Servo to Arduino.

Picture of Connect the Servo to Arduino.

Now that our notifier is ready we must connected it to the arduino.

First we must expand our servo cables with some simple jumper male-to-male cables.

Second we have to find the color code of our servo.Mine is a hitec and the color code is:

  1. Black cable to the GND pin of the arduino
  2. Red cable to the 5V pin of the arduino
  3. Yellow cable to pin 9 of the arduino

Connect the servo to arduino and we are ready to test it but not with our code.We will use the Sweep code of the IDE.

Third Open the Arduino IDE --> File --> Examples --> Servo --> Sweep and upload it to the arduino.

Now that our hardware is working with the software, we continue to the next step.

Step 5: Allow Your Gmail Account Access to Less Secure Apps .

Picture of Allow Your Gmail Account Access to Less Secure Apps .

In order to use the python script we must first allow our google gmail to use less secure apps.

You can find the full documentation here Google less secure apps

Turn on the Access for less secure apps from here Google less secure apps on/off

Step 6: Modify Python Script and Test It.

Ok we are heading to the end. One step to finalize our project

In this step we will :

  1. Modify the python script.
  2. Talk about the arduino code.
  3. Test the notifier.

Python script. I am using a Linux based system and it is much easier for me to use the command line. Open a terminal and cd to your folder where you download the ardumail zip from the github in step 3. Use a text editor and open the file ardumail.py.(for example i used the command sudo nano ardumail.py). We must change 3 things:

    1.ser = serial.Serial('/dev/ttyACM0', 9600) this is where your seial port goes. Open the arduino IDE and look down in your right you will see it.

    2 & 3.obj.login('*************@gmail.com', '*********') at the first field you must enter your email address and at the second field add your password.

    Save and exit the python script and continue with the

    ------------------------------------------------------------------

    Arduino code. The code for the arduino is very simple. It checks if the serial port is available, then if the value is 0 moves the servo 170 degrees and if the value is 1 moves the servo 90 degrees.

    ------------------------------------------------------------------

    Test the notifier. Upload the arduino code and open a terminal. Cd to your folder with your ardumail.py file and execute sudo python ardumail.py. Continue and go to your gmail, send an email to yourself and you will see the servo moving.Then read that email and you will see the servo moves to its previous place.

    You can now take the pencil and draw whatever you want.Or you can let your kid do it.

    *The steps for the Windows and Mac users are the same. Modify the python script, upload the code to the arduino, run the python script send an email to yourself.

    Step 7: Demo Video

    This is the arduino servo gmail notifier that you can:

    1. built with your kids and have fun.
    2. use it with your Raspberry Pi.

    Have fun!!!

    Comments

    NickP82 (author)2016-03-14

    On windows doesn't work.. From arduino serial monitor servo's arm work, but when i open ardumail.py from cmd and i send an email, arm doesn't work. Can you help me? I think is a serial problem with code of python.. I've installed pyserial. Thanks

    Tsartsanis (author)NickP822016-03-15

    i cant really help you with windows because i use only Linux. The python code is really simple and i think it is a windows setup that you have to find. Maybe a firewall blocks the serial when the email is coming.

    robiatulsapiai (author)2016-02-27

    can i use arduino uno instead?

    Yes you can use your Arduino Uno. I just used my Yun because it was available at that time.

    Tsartsanis (author)2016-01-05

    Yes, this project works only with gmail

    Good work. This is very handy if you ( for instance :-) ) sell something and you need to know when an order comes in. Thanks.

    DIY Hacks and How Tos (author)2015-12-08

    Fun way to keep track of your inbox.

    About This Instructable

    7,956views

    115favorites

    License:

    Bio: Raspberry Pi & Arduino explorer
    More by Tsartsanis:Anonymously Browsing With Tor (installation) at the Raspberry Pi 3.Encrypted Messages With Bitmessage on the Raspberry PiAutomatic Touch-free Toilet Paper Dispenser.
    Add instructable to: