SD Card Formatting Issues

I’m working on a few different tasks with files and the SD card functionality of the v5 brain, but I am running into some issues with reading the files from my computer.
All I’m doing is running a version of @jpearman’s code from this thread, but I simplified it to just send floats into the write buffer. This works, and the brain can read the file just fine, it’s just when I try and open this file on my computer (in VSCode or notepad++), all I get is unknown character symbols or a bunch of spaces with random characters interspearced.

Here’s the .txt file the program generates:
link, and yes it is a 15MB text file. (The forum doesn’t allow .txt uploads so this a drive link).

Any ideas on why this would happen, and or ways I could read these files on my PC?
I’ll post my personal code if need be, but it’s nearly an identical copy of jpearman’s.

1 Like

you are probably just writing raw binary data into that file. If you want to see as text on your computer you would need to write the floats formatted as text. I downloaded the file, but I’m not sure if it transferred to google drive properly as it just seems full of zeros. perhaps compress it into a zip file to attach here.


I’ll do that when I get to an actual computer.

To pass the float as text, would I just use sprintf formatting to just pass the float into the quotes?
appendFile(“text.txt”, “%f”, sizeOf(databuffer), floatValue)
Or something of the sort?

Yeah that was the problem, it reads correctly now.

I think the reason you were seeing so many zeros is that I appended the entire 15000 byte buffer every time I collected data, causing there to be about 4-5 bytes of data per 15000 bytes.
Probably why the SD card was so hot.