*Newbie* Saving data to local file

I have an imp running and reading temperatures.
I would like to save these temperature values in a file on a local PC.
Is there an easy way to do that?

Thank you

Just happened to log into forum and caught your post.

The easiest I could think of, as all it basically requires is a cut and paste of the following code found in this tutorial (https://gist.github.com/evilmachina/6402955). This will send your temperature readings from imp device to the IMP agent and then from agent to ThingSpeak (https://thingspeak.com/) using ThingSpeak API.

Then within your ThingSpeak channel there is an export option which will download all the saved data in CSV format onto your pc. Quite simple really.

Now if you were wanting to get data from imp device directly to your PC without going through the agent then you would need to set up a serial connection in your device code and would need additional hardware to manage data transfer.

To configure device you would add in code, something like this:

UART <- hardware.uart1289;
UART.configure(9600, 8, PARITY_NONE, 1, NO_CTSRTS, — insert your callbackFunction here —);

This will allow you to stream your temperature data through the allocated device pins as matched by uart1289 assignment. You would then use a suitable interface board between imp and PC to allow your PC COM port to read the imp device UART feed.

An example of suitable hardware would be to use a USB to TTL adapter – remember to make sure the TTL logic is matching IMP logic voltage of 3.3V and not 5V logic as per Arduino etc.

Here is an imp document reference explaining debugging using UART:
http://electricimp.com/docs/hardware/disconnecteddebugging/
This should give further guidance on this method.

It worked. Thank you
Too slow for my application though. I can only get one value every 15 - 20 seconds.

You can also just use the IMP agent to show the data, then have your application pull the data directly. I do that with my weather station.

JSON <3

MikeyDK,

Could you explain how you pull the data from the agent?

Thanks

You can also use www.Plot.ly which will allow more frequent data uploads/streaming. Here is an online tutorial for you: https://plot.ly/electric-imp/tmp36-temperature-tutorial/

Otherwise would be curious about method to pull data from agent directly. Could only think that was possible through IDE itself, if you inserted this in either device or agent code…

server.log( ---- place your temp variables here ----);