modelLedChaser

Two-way LED chaser: one LED (Peripherals.LED) per pin GP0-GP7, laid out in a ring around the microcontroller, lit one at a time in the order GP0->GP3 (left) then GP7->GP4 (right), then the other way round

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

Information

Demonstrator (outside the verification scenarios of requirements.md): eight Peripherals.LED, one per pin GP0-GP7, laid out in a ring around mcu (left column GP0→GP3 from top to bottom, right column GP4→GP7 from top to bottom). The script led_chaser.py lights a single LED at a time and makes it run along this ring (0,1,2,3,7,6,5,4 then back) — when replaying the animation of a simulation result in OMEdit, each LED lights up briefly in turn.

Components

TypeNameDefaultDescription
MCUmcuscriptPath = Resources/Scripts/MCU/led_chaser.py
Modelica.Electrical.Analog.Basic.Groundground
Modelica.Electrical.Analog.Basic.Resistorr0limits the current of led0 (GP0)
Modelica.Electrical.Analog.Basic.Resistorr1limits the current of led1 (GP1)
Modelica.Electrical.Analog.Basic.Resistorr2limits the current of led2 (GP2)
Modelica.Electrical.Analog.Basic.Resistorr3limits the current of led3 (GP3)
Modelica.Electrical.Analog.Basic.Resistorr4limits the current of led4 (GP4)
Modelica.Electrical.Analog.Basic.Resistorr5limits the current of led5 (GP5)
Modelica.Electrical.Analog.Basic.Resistorr6limits the current of led6 (GP6)
Modelica.Electrical.Analog.Basic.Resistorr7limits the current of led7 (GP7)
MicroPythonMCU.Peripherals.LEDled0GP0, top left
MicroPythonMCU.Peripherals.LEDled1GP1, left
MicroPythonMCU.Peripherals.LEDled2GP2, left
MicroPythonMCU.Peripherals.LEDled3GP3, bottom left
MicroPythonMCU.Peripherals.LEDled4GP4, top right
MicroPythonMCU.Peripherals.LEDled5GP5, right
MicroPythonMCU.Peripherals.LEDled6GP6, right
MicroPythonMCU.Peripherals.LEDled7GP7, bottom right