Page 1 of 1

Logging accelerometer data

Posted: 06:44, 16 Jun 2015
by joaocorreia
Hi,

Any tips or directions on how to log accelerometer data to a log file and then mail it?

Thanks
Joao

Re: Logging accelerometer data

Posted: 23:01, 08 Jul 2015
by ardiri
the first thing you'll need to do is store the information somewhere

    - 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}

Re: Logging accelerometer data

Posted: 19:51, 12 Jul 2015
by lb96
Try looking at this plugin for emailing data

https://github.com/katzer/cordova-plugi ... /README.md