modelHeart

The LED matrix shows a beating heart: Image.HEART and Image.HEART_SMALL alternate every 500 ms

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

Information

Expected result: the dots of the 5x5 matrix on the icon of mb light up in a heart shape (brighter while Image.HEART is shown than during Image.HEART_SMALL), and the LED currents in the plot (mb.led_x_y.mean.y) show the 60 Hz multiplexed scan of the rows.

The program is written for the official micro:bit MicroPython API (from microbit import *) and runs unchanged on a physical micro:bit.

Components

TypeNameDefaultDescription
MicroPythonMCU.MicroBit_v2mbProgram: Resources/Scripts/MCU/microbit_heart.py
Modelica.Electrical.Analog.Basic.Groundground
Modelica.Blocks.Sources.BooleanConstantbtnAbutton A idle
Modelica.Blocks.Sources.BooleanConstantbtnBbutton B idle