modelFileSystem

Two data loggers start from the same flash image: each gets its own copy and writes its own measurements

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

Two MCU blocks start from the same flash image, Resources/FileSystems/datalogger (the one of Examples.FileSystem.Boot). Each one gets its own timestamped copy, named after its instance (mcu1_datalogger_<date>, mcu2_datalogger_<date>), with its own current folder and its own /lib on the import path: nothing written by one board appears on the other, as with two real boards.

mcu1 logs a ramp from 0 to 3.3 V, mcu2 a constant 1 V, each in its own /data/measurements.csv. The self-check of main.py (exact content of /, read-back, attempt to escape the flash) passes on both boards and sets their GP1 high.

Components

TypeNameDefaultDescription
MCUmcu1boot.py then main.py of its own copy of Resources/FileSystems/datalogger (folder mcu1_datalogger_<date>)
MCUmcu2same image, its own copy (folder mcu2_datalogger_<date>)
Modelica.Electrical.Analog.Basic.Groundground
Modelica.Electrical.Analog.Sources.RampVoltagerampvoltage measured by mcu1 (GP0): ramp from 0 to 3.3 V in 1 s
Modelica.Electrical.Analog.Sources.ConstantVoltagesteadyvoltage measured by mcu2 (GP0): constant 1 V