File (ESP32 SDMode) longer string possible?

Post here to discuss any new features, components, chips, etc, that you would like to see in Flowcode.
Post Reply
stefan.erni
Valued Contributor
Posts: 1305
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 246 times
Been thanked: 258 times

File (ESP32 SDMode) longer string possible?

Post 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
2026-10-15_19-03-46.PNG (149.6 KiB) Viewed 75 times

BenR
Matrix Staff
Posts: 2343
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 647 times
Been thanked: 856 times

Re: File (ESP32 SDMode) longer string possible?

Post 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?
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

stefan.erni
Valued Contributor
Posts: 1305
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 246 times
Been thanked: 258 times

Re: File (ESP32 SDMode) longer string possible?

Post 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:
Sd_Card_MD_text_Copy.fcm
(4.43 KiB) Downloaded 4 times
And every test is working fine. PERFECT!
2026-10-16_15-14-00.PNG
2026-10-16_15-14-00.PNG (104.36 KiB) Viewed 43 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
2026-10-16_16-37-58.PNG (126.28 KiB) Viewed 43 times
2026-10-16_16-06-52.PNG
2026-10-16_16-06-52.PNG (99.82 KiB) Viewed 43 times

BenR
Matrix Staff
Posts: 2343
Joined: Mon Dec 07, 2020 10:06 am
Has thanked: 647 times
Been thanked: 856 times

Re: File (ESP32 SDMode) longer string possible?

Post 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"
Regards Ben Rowland - MatrixTSL
Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel

stefan.erni
Valued Contributor
Posts: 1305
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 246 times
Been thanked: 258 times

Re: File (ESP32 SDMode) longer string possible?

Post 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
2026-10-16_18-18-52.PNG (99.69 KiB) Viewed 36 times

Post Reply