I am very new to Arduino. Just received my board last night. However, I already have my temprature sensor up and working. [smiley=thumbsup.gif]But... what I need/would like to do is take the serial output (temprature) and either log the data to my PC or based on a certain threshold send an e-mail or trigger something to send an e-mail. I have searched the forum as well as the internet but cannot seem to find what I am looking for. Please be gentle this is my first post ![]()
Thanks in advance.
Welcome!
As for logging your serial data, that is noe in the arduino realm. You'll need to use a programming language. [C++ / Visual Basic / Java / Python etc etc]. The same goes for the emailing part.
The logging program should log all data recieved at the serial port. And eventually write it to file.
This file could then be sent over mail.
Do you know any programming languages?
I know Perl, can most likely learn any one of the others you have listed. So basically if I understand I will just need to write a program to capture the data that comes in via the serial port and then do what ever I want with it from there. Don't think that should be too difficult..... Thanks for the quick reply. ![]()
This should be fairly easy to do in Perl. What I would do is write some small server
applications that would communicate between the two devices. I would write a
DataSRV to retrieve data from the serial port. For an application to get
data it would open a socket to DataSRV and read data. DataSRV would get the
data from the serial port periodically or on demand. DataSRV could also log
to a database.
To send a mail message I would create MailSRV that attaches to DataSRV.
I have been working on simple perl servers that I should be releasing in the next
month or so ---
-
XBsrv -- tcp socket interface for an XBee.
Strings sent to the socket are transmitting to
the XBee using the USB port. -
XBwww -- simple webserver that opens a tcp socket
to XBsrv. Strings can be sent from a webpage
to XBsrv (which then sends the strings to the XBee)
(* jcl *)
"either log the data to my PC"
I've recently discovered that Hyperterminal has the ability to capture the text that arrives over the serial port. (Transfer|Capture text)
I was using it to log temperature data overnight.
The file was saved to the IIS root in CSV format so I could get to it from wherever.
Sorry I can't help with the email notification, but it might help!
Easty.
Hi,
You may be interested in Processing, http://www.processing.org - it's a very similar language to the Arduino/Wiring language. I've seen something you may be interested in, http://accrochages.drone.ws/en/node/90 - an 'oscilloscope' made using an arduino's analogread and sent to the computer over serial for display in processing.
I'm sure you could add some code to wait for a larger duration between readings, and/or adjust the code in processing to average lots of readings before generating a new value on the graph.
Have fun!!
Ed
![]()