Hi,
Any tips or directions on how to log accelerometer data to a log file and then mail it?
Thanks
Joao
Logging accelerometer data
Re: Logging accelerometer data
the first thing you'll need to do is store the information somewhere
there are many options available; the networking shields actually have an SD card slot on them - so, that may be something you want to consider. once you have this data in storage; you can use a TCP/IP based network device and communicate with a SMTP mail server and exchange the information. you simply communicate over port 25 (the easiest) to such a server and then adhere to the protocol:
https://en.wikipedia.org/wiki/Simple_Ma ... r_Protocol
they post a great example of this communication protocol on the wiki:
- - SD card
- FRAM/flash
there are many options available; the networking shields actually have an SD card slot on them - so, that may be something you want to consider. once you have this data in storage; you can use a TCP/IP based network device and communicate with a SMTP mail server and exchange the information. you simply communicate over port 25 (the easiest) to such a server and then adhere to the protocol:
https://en.wikipedia.org/wiki/Simple_Ma ... r_Protocol
they post a great example of this communication protocol on the wiki:
Code: Select all
S: 220 smtp.example.com ESMTP Postfix
C: HELO relay.example.org
S: 250 Hello relay.example.org, I am glad to meet you
C: MAIL FROM:<bob@example.org>
S: 250 Ok
C: RCPT TO:<alice@example.com>
S: 250 Ok
C: RCPT TO:<theboss@example.com>
S: 250 Ok
C: DATA
S: 354 End data with <CR><LF>.<CR><LF>
C: From: "Bob Example" <bob@example.org>
C: To: "Alice Example" <alice@example.com>
C: Cc: theboss@example.com
C: Date: Tue, 15 January 2008 16:02:43 -0500
C: Subject: Test message
C:
C: Hello Alice.
C: This is a test message with 5 header fields and 4 lines in the message body.
C: Your friend,
C: Bob
C: .
S: 250 Ok: queued as 12345
C: QUIT
S: 221 Bye
{The server closes the connection}
Return to “Questions and answers”
Who is online
Users browsing this forum: No registered users and 11 guests