Go Down

Topic: E-Mail / RSS checking LED (Read 2 times) previous topic - next topic

Robohac

Hy,

I just finished a LED Cube and thought LED's are good signes. How can I make my Arduino uno recieve E-Mails and RSS feeds, so he can lite a LED? Is USB ok or should I bui the ethernet shield?

Thanks
Robohac

Robohac

I found a Video, but there isn't written how he made this:

http://vimeo.com/3875632

Robohac


alfred_j_kwak

I suppose that he said into video that PC sends info into arduino.
So you could write python script that checks your email and then send results with serial into your arduino sketch.

-Jussi-


Robohac

but how can I make the Scetch and the .py script comunicate?

robtillaart

Over the serial port?!!

A sample python sketch that reads from the arduino may help to get you started

Code: [Select]

import sys, os, serial

def monitor():

    ser = serial.Serial(COMPORT, BAUDRATE, timeout=0)

    while (1):
        line = ser.readline()
        if (line != ""):
            #print line[:-1]                 # strip \n
            fields = line[:-1].split('; ')
            ID = fields[0]
            # print fields
            print "device ID: ", ID
            # write to file
            text_file = open("Pdata.log", "w")
            text_file.write(line)
            text_file.close()

        # do some other things here

    print "Stop Monitoring"


""" -------------------------------------------
MAIN APPLICATION
""" 

print "Start Serial Monitor"
print

COMPORT = 4;
BAUDRATE = 115200

monitor()

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Robohac

but the arduino uno haves only a usb port should I replace serial with usb?

mowcius

Quote
but the arduino uno haves only a usb port should I replace serial with usb?

It has a USB to serial converter on board so it appears as a serial port to your computer.

Robohac

woops sorry I didn't know that

robtillaart

Came across this one today : -  http://stackoverflow.com/questions/1225586/checking-email-with-python
should get you started.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Robohac


robtillaart

it compiles under my python 2.7
In the comments there is a ref to - http://snippets.dzone.com/posts/show/4024 - which is a more elaborate checker, includes sending mail too.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

jumpjack


Hy,

I just finished a LED Cube and thought LED's are good signes. How can I make my Arduino uno recieve E-Mails and RSS feeds, so he can lite a LED? Is USB ok or should I bui the ethernet shield?

Thanks
Robohac

wihtout ethernet shield, your PC must be always on to retrieve emails and send them to Arduino.
With ethernet shield you don't need any PC at all.

Robohac

But with ethernet shield I need a server. Or not? How should I programm that?

mowcius

Quote
How should I program that?

With difficulty - You would need some kind of server (but if you have an email address then you probably have one you can access). You can probably monitor an imap server for new messages.

Go Up