Write MD Files to Sd-Card Embedded

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: 1300
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 246 times
Been thanked: 258 times

Write MD Files to Sd-Card Embedded

Post by stefan.erni »

Hi Steve

It's useful to save a device's configuration to an SD card Embedded.
That way, you have an overview of the exact parameters or properties used in that specific firmware version.

With a *.MD file, you can easily do this with graphics.

(An MD file is a Markdown document (.md) that stores formatted text using simple plain-text syntax. It is commonly used for documentation, README files, notes, and web content)

Variables and strings are easy to save,
but the properties—for example, those of the AD converter don't work.
It does not change the string variable

How exactly do you do this using the built-in functions?
Or is there some way to do that easier?

Write command:
2026-10-07_11-30-55.PNG
2026-10-07_11-30-55.PNG (187.88 KiB) Viewed 82 times

As Demo Result open with a MD viewer:
2026-10-07_11-27-16.PNG
2026-10-07_11-27-16.PNG (70.14 KiB) Viewed 82 times

Steve-Matrix
Matrix Staff
Posts: 2061
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 311 times
Been thanked: 479 times

Re: Write MD Files to Sd-Card Embedded

Post by Steve-Matrix »

Property.GetValue should return the current property value as a string. Is that not happening correctly for you?

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

Re: Write MD Files to Sd-Card Embedded

Post by stefan.erni »

Hi Steve

In the simulation Property.GetValue the value it shows is 004
I think that's correct.

But in the compiled version running in the ESP32 the string it's empty.

2026-10-07_13-21-38.PNG
2026-10-07_13-21-38.PNG (62.89 KiB) Viewed 71 times
2026-10-07_13-19-43.PNG
2026-10-07_13-19-43.PNG (38.23 KiB) Viewed 71 times

Steve-Matrix
Matrix Staff
Posts: 2061
Joined: Sat Dec 05, 2020 10:32 am
Has thanked: 311 times
Been thanked: 479 times

Re: Write MD Files to Sd-Card Embedded

Post by Steve-Matrix »

Almost all Inbuilt Function calls in Flowcode are essentially simulation-only. This includes the Property.SetValue function.

If you want to query and store the values in the embedded app itself, then you will need to use other techniques. For example, there is the "AddVar" event which is called for each global variable and constant and allows these to be changed at compile-time to reference property values.

You can find a bit more info about this in the wiki (e.g. here). And there are some examples in the components. For example, the source for the RGB_LED_WS2801 component shows the "RBG" array definition being modified to take into account the number of LEDs.

I rarely use this feature, so Ben might have other suggestions.

Post Reply