Code Example for micro:bit-Anti-theft Exhibition Booth

Last revision 2025/12/08

The article provides a comprehensive guide on setting up an anti-theft system for exhibition booths using micro:bit and BOSON modules, detailing hardware and software preparations, wiring diagrams, and programming with Mind+ and Makecode.

Hardware Preparation

BOS0002 Push Button Module BOS0020 Buzzer Module
MBT0039 Micro:bit BOS0040 Micro:bit BOSON Expansion Board

Software Preparation

  • Development Tools: Mind+ or Makecode
  • Mind+ Download Link: Mind+
  • Makecode Download Link: Makecode

Wiring Diagram

Connection 4

Other Preparation Work

  1. Connect the micro:bit to the BOS0040 Micro:bit BOSON Expansion Board.
  2. Ensure all components are properly wired as per the diagram.

Sample Code

Mind+ Sample Program

Mind+4

Result

The buzzer sounds when the item is taken away (button released).

Additional Information

Flow Chart:

Was this article helpful?

TOP