Saving data to hard drive

Hello,

I have several DS18B20 sensors on an arduino mega, I know how to save stamped values to a SD card, but everything is in a box that I need to open to get the SD card, which is not easy.
My arduino is connected to my router (Freebox) by an ethernetshield, How can I save data as a txt file to a hard drive connected to the router or a hard drive of the LAN.
Any ideas welcome
Thank you
Lionel

You would need a FTP server running on a computer.
Then FTP file over.
To me that is easiest.

This is often solved by running a web server on the target computer with a web page the arduino can execute a GET request against. The web page code pulls the sensor data out of the request and can then do with it as it pleases - push to database, text file etc.

Ok thank you very much,
I will try ftp way
Lionel

If I understood WildBill’s answer correctly, I have been using almost the… inverse?.. of his solution for years, on several computers…

Set the Arduino up as a very simple web server. Include a machine-friendly line in the page returned. It can be in a comment, so that the page returned looks nice to humans, too.

For instance, go to…

http://mon7nc.dyndns.org:81

A line near the top of that says…

… which means that at the time the server was accessed, there’d been 0006 accesses since the most recent boot. (Blush… it had frozen, and I hadn’t noticed!) And that the DS18B20 on the Arduino was reporting +23.43 degrees C, and the first counter 0119 (count of windspeed sensor pulses) and the second counter 1023 (count of rainfall sensor pulses) ((The counters are external, and not reset by the reset of the Arduino))… Data format: nnnnSttttccccCCCC. (Yes, I should put a checksum in that.)

Once that’s in place, you can use a “fetch webpage” routine in a program on the big computer of your choice to fetch readings from the Arduino(s!) as often as suits you, and have your wicked way with it. (Logging the reading to a hard drive is the first step, of course.) What you can do with the data in a big computer, with a monitor is awesome.

This seems the elegant division of labor, to me: Little guy does a little job, and the heavy lifting done by the big computer. And I don’t have to remember to go out, collect and replace SD cards. And the Arduino’s enclosure, out there in the wind and the weather, doesn’t have to be opened very often. So if to get it watertight means that it isn’t easy to open, I don’t care.

===
For many years, my weather recording was based on a network of sensors managed directly by the big computer. It is trivial to adapt my Farwatch programs adapt to a sensor- readings- from- networked- by TCP/IP Arduinos model. (Just a tweak of the “fetch sensor readings” subroutines).

Live example of what is possible…
http://mon7nc.dyndns.org/

Full story… including some incredibly harder-that-it-has-to-be (but none the less working!) 1-Wire “solutions” at FarWatch- a system to monitor premises remotely- ssds043