Example Code for micro:bit-Anti-theft Exhibition Booth
The anti-theft exhibition booth works in this way: put each item on a button module, when the item is placed on the booth, at this time the button is pressed; when it's taken away, the button is released and the buzzer makes sounds.
Hardware Preparation
![]() |
![]() |
|
|---|---|---|
| BOS0002 Push Button Module | BOS0020 Buzzer Module | BOS0029 Logic Module-NOT |
![]() |
![]() |
![]() |
| MBT0039 Micro:bit | BOS0040 Micro:bit BOSON Expansion Board | BOS0035 Mainboard-3IO |
Software Preparation
micro:bit and Micro:bit BOSON expansion boards are used in the programming example.
Wiring Diagram
Non-programming Sample Connection Diagram:

Programming Sample Connection Diagram:

Other Preparation Work
micro:bit and Micro:bit BOSON expansion boards are used in the programming example.
Additional Information
Flow Chart:

Was this article helpful?





