Serial data storage as file on SD card

Hello Aduino community!

After researching while this post was pretty mutch ignored, I've found a way to read binary data from SD card as displaying it on my led matrix.
The new problem is the way data is stored on sd card.
There is some way to transfer "raw" data throw serial port and store it in 1 single file (byte to byte/char to char)?

Thanks for your help guys/girls!

You can send the file using e.g. realterm from PC to arduino. The arduino side reads the data and writes it to SD.

See this post to get an idea.

It makes use of software handshake (xon/xoff). The PC just starts pumping data and it's written to (in the example) eeprom (you can change it to SD card). If the arduino can't keep up, it will send a xoff to the PC and the PC will stop sending. Once there is no serial data available, the arduino will send a xon to the PC and the PC will resume. You will need to set the terminal program up to make use of xon/xoff (and serial monitor does not support that).

I don't have an SD breakout so can't test an implementation.

The code was written as a test code (and I can't remember what the idea behind the timeout was :frowning: )

Alternative is to write a dedicated application for the computer and at the arduino side and implement a protocol to handle the communication (e.g. send 32 bytes from PC, wait for acknowledge from arduino etc).

Yes, the final "desktop app" will be made in js (IONIC framework) & I was thinking implement the good old way of serial communication like on Marlin firmware.

So when i send entire "frame" of data, I'll wait for Arduino response "OK!" and after that, I'll be able to send the next line. The line will be appended to binary file and when transmission finished, it will be "played"