Simple Arduino Gmail Notifier Project

Simple python script checks for mail using imaplib and tells the arduino via serial connection. Arduino activates a simple servo motor rotating the flag.

Code:

import serial
import time
import imaplib, re

ser = serial.Serial(3)
print "Starting on " +ser.portstr;
conn = imaplib.IMAP4_SSL("imap.gmail.com", 993)
while (True):
conn.login('YOUR GMAIL USERNAME','YOUR PASSWORD')
unreadCount = int(re.search("UNSEEN (\d+)", conn.status("INBOX", "(UNSEEN)")[1][0]).group(1))
if(unreadCount > 0):
print str(unreadCount) + " new mails!"
ser.write("M")
else:
print "no mail :( "
ser.write("N")
time.sleep(5)

And on the arduino:

#include

int outPin = 2; // Output connected to digital pin 2
int mail = LOW; // Is there new mail?
int val; // Value read from the serial port
Servo motor;
void setup()
{

Serial.begin(9600);
Serial.flush();
motor.attach(outPin);
}

void loop()
{
// Read from serial port
if (Serial.available())
{
val = Serial.read();
Serial.println(val);
if (val == 'M') mail = HIGH;
else if (val == 'N') mail = LOW;
}

// Set the angle of the servo
if(mail)
motor.write(0);
else
motor.write(90);
}

via Redit

Popularity: 2% [?]

DIY Trailer Guide Post Lights

This cheap project shows how to turn some simple parts into guide light for a boat or trailer.

Popularity: 45% [?]

Making a USB Powered Coffee Warmer (Video)

Household Hacker breaks down the steps in turning a old out of date microprocessor and re-purposing it into a USB Powered Coffee Warmer.

Popularity: 4% [?]

How To Make A Cheap Camera Ring Flash

DIY DSLR Ring-Flash build for macro and studio photography. By Motley Pixel.

Popularity: 49% [?]

How To Wire Your Home Network

Iyaz Akhtar shows how to make your own ethernet cables, how to attach ethernet to keystones for a great finished look in your home and more.

Popularity: 40% [?]

MikroKopter Follows The Action With Camera Tracking System

These German guys put together a cleaver project for filming a Wakeboarder on a lake. The six propeller “MikroKopter” sports a camera which follows the action by receiving a signal via an automatic tracking transmitter. The mount calculates the angle and adjust the camera to keep the rider in view.

[MikroKopter]

Popularity: 9% [?]

Fiber Optics 101 With The Engineering Guy

Fiber Optics are just cool. Here the Engineering guy breaks down the basics of how tiny beam of light can twist and turn through a cable or liquid and still reflect out the other side.

Popularity: 35% [?]

Phase Lock Loop 101

Jeri Ellsworth Bil Herd discuss the basics of Phase Lock Loops(PLLs). PLL are a essential components in modern micro controllers.

Popularity: 8% [?]

Japanese Ball Drone (Video)

This Japanese Ball drone sure knows how to make an entrance. Its single propeller is kinda unique, by the look of it in the video it seems to angle to control the direction of hover.

Popularity: 4% [?]

PIR Activated Light Emitting Dress

Inventor Jeri Ellsworth puts together a simple circuit for a Light Emitting Dress. Activated by a PIR a simple delay circuit activates a set of LED’s embedded in the dress. The Electronics are housed and hidden in an old Instamatic camera.

Popularity: 8% [?]