packageMicroBit
Examples with the micro:bit v2 board: LED matrix, buttons, edge pins
Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).
Information
Models using MicroPythonMCU.MicroBit_v2: the 5x5 LED matrix, the A/B buttons and the edge pins, driven by MicroPython programs written for the official microbit module API (they run unchanged on a physical micro:bit).
Contents
| Name | Description |
|---|---|
| The LED matrix shows a beating heart: Image.HEART and Image.HEART_SMALL alternate every 500 ms | |
| Button A counts its presses (scrolled on the display), button B resets the counter - the presses are driven from the diagram (BooleanPulse) | |
| The edge pins as on the board: P1 drives P0 through a wire loop, the display mirrors the level read on P0 | |
| Scenario driven by time tables: button presses, accelerometer shake, temperature and light ramps - no external wiring needed | |
| Two micro:bit chatting over the radio: the left one sends PING 1..5 (one per second), the right one displays and counts them - their antennas are wired by a single wire, like two boards on the same air |