modelRadioChat

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

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

Information

Two MicroBit_v2 wired together by one antenna wire (as two Peripherals.Radio.RadioModem would be): their Antenna ports connect directly, so their radio modules hear each other - two boards on the same air, like two real micro:bits with matching channel/group/address.

Expected result: the left board scrolls S1...S5 as it sends PING 1...PING 5 (one per second), the right one displays and counts each received PING n. In the log, TX 1...TX 5/TX_DONE and RX PING 1...RX PING 5/RX_DONE 5 interleave. The buttons are kept released (constant mode): this example is about the radio.

The same programs run unchanged on physical micro:bits. See the user guide (micro:bit, radio section) and Examples.MicroBit.Scenario for the internal-table alternative.

Components

TypeNameDefaultDescription
MicroPythonMCU.MicroBit_v2txProgram: Resources/Scripts/MCU/microbit_radio_tx.py; sends PING 1..5 on the air
MicroPythonMCU.MicroBit_v2rxProgram: Resources/Scripts/MCU/microbit_radio_rx.py; listens and counts the PINGs
Modelica.Electrical.Analog.Basic.Groundgtx
Modelica.Electrical.Analog.Basic.Groundgrx