How to Save a File from the Internet to an Arduino

The article on saving a web file to an Arduino shows how to get any file from the Internet using an Arduino and Ethernet shield and save the file to an SD card inserted into the Ethernet shield.




Two sketches are provided in the article — the first sketch saves the incoming HTTP header and the requested file. If a project requires further information from the HTTP header, it can be obtained from the file instead of trying to process the incoming header on-the-fly.

The second sketch in the article strips off the incoming HTTP header and saves only the requested file to the SD card.

Saving a web file to SD card first before accessing data from it allows the data to be randomly accessed in the file instead of trying to find data from the file in the incoming stream of bytes. This is useful for retrieving data from an XML file such as from a live sports or weather feed. Specific data fields can be randomly accessed from the saved file and then used by the Arduino.

Go to the Arduino Web File Article →

Leave a Reply

Your email address will not be published. Required fields are marked *