Code to load files to SD Card via Arduino using the USB

Hi.
I have a situation where I have an INI file on the SD card. I need a ways to load - via the serial USB - new files to the SD Card.

Many thanks
Dave

You should be able to copy the contents of the INI file into the Serial monitor input box, read it on the Arduino and save it in a file on the attached SD card

What have you tried ?

Currently I am looking to see if someone has already done this a d shared the code.

I will be writing a PC side app that will set up the INI fileā€¦

I will be writing a PC side app that will set up the INI file..

If you incorporate serial output into it then you will not need to use the Serial monitor.

True..

But the INI file is a start. What happens when I want so save a Bitmap file?

marcwolf:
What happens when I want so save a Bitmap file?

You will be sending, receiving and saving it byte by byte. Neither the PC or the Arduino will have any idea of the nature of the data.

Why not try something simple.
Write an Arduino program to receive serial data from the Serial monitor and put it onto an SD card with a fixed filename. If it works then you will be able to read the file on the Arduino and/or the PC. You need to consider the baud rate to be used and the time that it takes to write to the SD card. The small program will allow you to test whether the idea will work at all.

Do you have the option of using a different Arduino or perhaps an ESP8266 in your project ?

The target processor will be a ESP32 and I will be writing to SPIFF. But if I say that then I get about 100 post saying that I should use OTA. Unfortunately my target is for people who have no idea about setting/changing their Wifi, Bluetooth. But should be able to handle a "Plug the USB cable in to the device and run XXXX"

So, have you tried the simple experiment that I suggested ?

Did you google? I found some info googling for arduino serial data to sd.

There should be a starting point in there.

Many many thanks for that :slight_smile:

Dave

marcwolf:
Dave

Hi Dave
I have to do the same, you can share your experience ?

It would be nice to be able to edit the .ini files from PC
Read, edit, save.