Code Example for micro:bit-Anti-theft Alarm for Gallery Exhibits

This article provides a comprehensive guide on setting up a micro:bit-based anti-theft alarm system for gallery exhibits, including hardware preparation, wiring diagrams, and sample code for programming, ensuring that any touch or tilt of the exhibits triggers an alarm.

Hardware Preparation

BOS0005 Tilt Sensor BOS0020 Buzzer Module BOS0008 Touch Sencor
MBT0039 Micro:bit BOS0040 Micro:bit BOSON Expansion Board

Wiring Diagram

Sample Code

Mind+ Sample Program:

Result

When someone touches exhibits or exhibits tilt, the system will give an alarm.

Additional Information

Flow Chart:

Was this article helpful?

TOP