Pages: [1] 2   Go Down
Author Topic: E-Mail / RSS checking LED  (Read 2786 times)
0 Members and 1 Guest are viewing this topic.
Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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
Logged

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Logged

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Can't anyone help me?
Logged

Finland
Offline Offline
Newbie
*
Karma: 0
Posts: 4
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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-

Logged

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Over the serial port?!!

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

Code:
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()

Logged

Rob Tillaart

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

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

woops sorry I didn't know that
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

Rob Tillaart

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

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

is that pithon 2 or 3 ?
Logged

Global Moderator
Netherlands
Offline Offline
Shannon Member
*****
Karma: 217
Posts: 13739
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Rob Tillaart

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

Rome
Offline Offline
God Member
*****
Karma: 1
Posts: 987
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Germany
Offline Offline
Newbie
*
Karma: 0
Posts: 32
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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

North Yorkshire, UK
Offline Offline
Faraday Member
**
Karma: 104
Posts: 5531
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1] 2   Go Up
Jump to: