| Modelica.Units.SI.Time | tickPeriod (from PartialMcuSettings) | 0.1 | Period of the minimal sync point (output freshness if the script never sleeps) |
| Python script |
| String | scriptPath (from PartialMcuSettings) | Modelica.Utilities.Files.loadResource("modelica://MicroPythonMCU/Resources/Scripts/MCU/demo.py") | Path of the user script (.py) - with an active file system, run after boot.py instead of main.py; empty = main.py from the flash |
| Boolean | addScriptDirToPath (from PartialMcuSettings) | true | Make the .py files next to the script importable (e.g. import my_module) - mimics the real Pico (flash root folder on sys.path) |
| String | libraryPath (from PartialMcuSettings) | "" | Optional: a .py file from a shared library folder to make importable (the folder containing this file is added to the module search path) - leave empty if unused |
| File system › Simulated flash |
| Boolean | fsEnabled (from PartialMcuSettings) | false | Enable the file system (simulated flash) - disabled: open() and os raise OSError |
| String | fsSource (from PartialMcuSettings) | "" | Initial image of the flash (folder: data, boot.py, main.py, lib/), copied at each simulation and never modified - any file of the folder, the folder path or a modelica:// URI; empty = blank flash, only the script runs |
| String | fsWorkspace (from PartialMcuSettings) | "." | Workspace: folder where each simulation creates its copy, named <instance>_<FS name>_<date>_<time> (created if missing) - "." or relative path = from the simulation folder; full path of the copy shown in the log |
| Boolean | fsOpenExplorer (from PartialMcuSettings) | true | Open Windows Explorer on the copy at the end of the simulation |
| Execution time |
| Modelica.Units.SI.Time | gpioOpTime (from PartialMcuSettings) | 5e-6 | Execution time of a pin access (Pin.value(), on(), off()): two writes without sleep() give a pulse of this width (bit-banging) - order of magnitude of MicroPython on RP2040; 0 = instantaneous accesses |
| Modelica.Units.SI.Time | hangWarningTime (from PartialMcuSettings) | 10 | Real (wall-clock) time after which a warning is logged if the script does not let the simulation advance (loop without sleep() nor pin access, or with gpioOpTime = 0) - the simulation keeps waiting; 0 = no warning |
| Debugging |
| Boolean | debugEnabled (from PartialMcuSettings) | false | Debug the program with VS Code: at the start of the simulation, the microcontroller waits until VS Code attaches (debugpy, Run and Debug > attach to localhost:debugPort); simulated time stays frozen while the program is paused - one microcontroller per model |
| Integer | debugPort (from PartialMcuSettings) | 5678 | Local TCP port on which the debugger (debugpy) listens - the port of the VS Code attach configuration |
| Electrical › Logic levels |
| Modelica.Units.SI.Voltage | VOL (from PartialMcuSettings) | Interfaces.VOL | Logic low voltage |
| Modelica.Units.SI.Voltage | VIH (from PartialMcuSettings) | Interfaces.VIH | Threshold above which an input reads high |
| Modelica.Units.SI.Voltage | VIL (from PartialMcuSettings) | Interfaces.VIL | Threshold below which an input reads low |
| Electrical › Output stages |
| Modelica.Units.SI.Resistance | ROut (from PartialMcuSettings) | Interfaces.ROut | Output series resistance (drive strength) |
| Electrical › Input stages |
| Modelica.Units.SI.Resistance | RPullUp (from PartialMcuSettings) | Interfaces.RPull | Internal pull-up resistor to the supply, switched on by Pin(n, mode, Pin.PULL_UP) and by I2C() on SCL/SDA |
| Modelica.Units.SI.Resistance | RPullDown (from PartialMcuSettings) | Interfaces.RPull | Internal pull-down resistor to GND, switched on by Pin(n, mode, Pin.PULL_DOWN) |
| Modelica.Units.SI.Conductance | GOff (from PartialMcuSettings) | Interfaces.GOff | Leakage of a pin that does not drive its line (input, released I2C line), towards GND: 1e-9 S = 1 GOhm |
| Power supply › Consumption |
| Modelica.Units.SI.Current | ICore (from PartialBoard) | 0.02 | Current drawn from the supply rail by the core and its memory while supplied (program running, pins excluded) |
| Power supply › Power-on |
| Modelica.Units.SI.Voltage | VPowerOn (from PartialBoard) | 1.8 | Supply rail voltage above which the core starts (power-on reset) |
| Modelica.Units.SI.Voltage | VPowerOff (from PartialBoard) | 1.6 | Supply rail voltage below which a running core stops for good (brown-out) |
| Power supply › USB |
| Boolean | usbConnected (from PartialUsbBoard) | true | USB cable plugged in: 5 V through the USB connector (the board runs without any wiring) - false to supply the board through its supply pin |
| Modelica.Units.SI.Voltage | VUsb (from PartialUsbBoard) | 5 | Voltage of the USB supply |
| Modelica.Units.SI.Resistance | RUsb (from PartialUsbBoard) | 0.2 | Resistance of the USB cable and connector |
| Power supply › Regulator |
| Real | eta (from PartialUsbBoard) | 0.9 | Efficiency of the regulator |
| Modelica.Units.SI.Voltage | VTgt | 3.0 | Voltage of the 3V rail (output of the on-board regulator, high level and ADC reference of the pins) |
| Pins › Supply |
| Boolean | useGroundPin | true | Show the GND pin - unchecked: the board is referenced to the simulation ground (0 V), nothing to wire |
| Sensors › Accelerometer |
| InputSource | accelXSource | InputSource.Constant | How accelX is driven: constant parameter, time table, or connector wired from the diagram |
| Real | accelX | 0 | X axis of the accelerometer, constant value (m/s2) |
| Real[:,2] | accelXTable | {{0, 0}, {0.5, 0}, {1, 5}, {1.5, 0}, {5, 0}} | Time table of accelX (column 1 = time in s, column 2 = value in m/s2) |
| InputSource | accelYSource | InputSource.Constant | How accelY is driven: constant parameter, time table, or connector wired from the diagram |
| Real | accelY | 0 | Y axis of the accelerometer, constant value (m/s2) |
| Real[:,2] | accelYTable | {{0, 0}} | Time table of accelY (column 1 = time in s, column 2 = value in m/s2) |
| InputSource | accelZSource | InputSource.Constant | How accelZ is driven: constant parameter, time table, or connector wired from the diagram |
| Real | accelZ | -9.81 | Z axis of the accelerometer (default: gravity, board lying display up), constant value (m/s2) |
| Real[:,2] | accelZTable | {{0, -9.81}} | Time table of accelZ (column 1 = time in s, column 2 = value in m/s2) |
| Sensors › Magnetometer/compass |
| InputSource | magXSource | InputSource.Constant | How magX is driven: constant parameter, time table, or connector wired from the diagram |
| Real | magX | 0 | X axis of the magnetometer/compass, constant value (uT) |
| Real[:,2] | magXTable | {{0, 0}} | Time table of magX (column 1 = time in s, column 2 = value in uT) |
| InputSource | magYSource | InputSource.Constant | How magY is driven: constant parameter, time table, or connector wired from the diagram |
| Real | magY | 50 | Y axis of the magnetometer/compass (default: field pointing along +Y), constant value (uT) |
| Real[:,2] | magYTable | {{0, 50}} | Time table of magY (column 1 = time in s, column 2 = value in uT) |
| InputSource | magZSource | InputSource.Constant | How magZ is driven: constant parameter, time table, or connector wired from the diagram |
| Real | magZ | 0 | Z axis of the magnetometer/compass, constant value (uT) |
| Real[:,2] | magZTable | {{0, 0}} | Time table of magZ (column 1 = time in s, column 2 = value in uT) |
| Sensors › Temperature |
| InputSource | tempSource | InputSource.Constant | How temp is driven: constant parameter, time table, or connector wired from the diagram |
| Real | temp | 27 | Temperature read by microbit.temperature(), constant value (degC) |
| Real[:,2] | tempTable | {{0, 27}, {10, 35}} | Time table of temp (column 1 = time in s, column 2 = value in degC) |
| Sensors › Light |
| InputSource | lightSource | InputSource.Constant | How light is driven: constant parameter, time table, or connector wired from the diagram |
| Real | light | 100 | Light level 0-255 read by display.read_light_level(), constant value (1) |
| Real[:,2] | lightTable | {{0, 200}, {5, 50}} | Time table of light (column 1 = time in s, column 2 = value in 1) |
| Buttons › Button A |
| InputSource | buttonASource | InputSource.Connector | How button A is driven: connector wired from the diagram, time table, or constant state |
| Boolean | buttonAPressed | false | State of button A in constant mode (true = pressed) |
| Real[:,2] | buttonATable | {{0, 0}, {1, 0}, {2, 1}, {3, 0}, {4, 0}, {5, 1}, {6, 0}} | Time table of button A (column 1 = time in s, column 2 = 0 released / 1 pressed) |
| Buttons › Button B |
| InputSource | buttonBSource | InputSource.Connector | How button B is driven: connector wired from the diagram, time table, or constant state |
| Boolean | buttonBPressed | false | State of button B in constant mode (true = pressed) |
| Real[:,2] | buttonBTable | {{0, 0}, {2.5, 0}, {3, 1}, {4, 0}} | Time table of button B (column 1 = time in s, column 2 = 0 released / 1 pressed) |