Page 1 of 1
File (ESP32 SDMode) longer string possible?
Posted: Thu Oct 15, 2026 6:18 pm
by stefan.erni
Hi Ben
Right now, the SD card is working very well with the ESP32-S3 and FC11.
But...
Append a string[20] isn't practical, to save a text line.
For the component File (ESP32 SDMode) is a longer string possible?
Maybe 150, 200, or 512—would be better.

- 2026-10-15_19-03-46.PNG (149.6 KiB) Viewed 102 times
Re: File (ESP32 SDMode) longer string possible?
Posted: Fri Oct 16, 2026 11:40 am
by BenR
Hello Stefan,
The string should be a pointer and so allow you to add your own string of any size. Try a bigger string and it should work, shout if it doesn't as it could be the "make a copy" parameter check box has been ticked by accident?
Re: File (ESP32 SDMode) longer string possible?
Posted: Fri Oct 16, 2026 4:11 pm
by stefan.erni
Hi Ben
You're right...
long string are already ok.
I made a lot of test with the string write to the sd-card (no interrupt)
The test are here:
And every test is working fine. PERFECT!

- 2026-10-16_15-14-00.PNG (104.36 KiB) Viewed 70 times
But if I sample and save data, there is a problem with the long string.
On top I save short string 25 times. its ok.
On Botton I save a long string in one go. I get problem even if i use simulate the data but interrupt is on.
The result with short string is perfect.
but with the long string a lot of data is missing or wrong.
I'll see what I can do.

- 2026-10-16_16-37-58.PNG (126.28 KiB) Viewed 70 times

- 2026-10-16_16-06-52.PNG (99.82 KiB) Viewed 70 times
Re: File (ESP32 SDMode) longer string possible?
Posted: Fri Oct 16, 2026 4:26 pm
by BenR
Hello,
I think the problem may be doing the conversion to string inside the concatenate, there is a temporary string created to allow this but it is limited in size to 20 characters by default.
Try doing this instead to work around the problem.
.TempStr = ToString$(All_Data_Int[.count])
Save_Str = Save_Str + .TempStr
Save_Str = Save_Str + "\r\n"
Re: File (ESP32 SDMode) longer string possible?
Posted: Fri Oct 16, 2026 5:27 pm
by stefan.erni
Hi Ben
It didn't help, even when I briefly disabled the IRQ.
But 25 short strings work fine.

- 2026-10-16_18-18-52.PNG (99.69 KiB) Viewed 63 times