Example Code for micro:bit-Teacher's Day Greeting

The article offers a comprehensive tutorial on building a Teacher's Day greeting project with micro:bit, incorporating hardware like motion sensors, LED modules, and voice recorders. It includes software preparation with Mind+ and MakeCode, wiring diagrams for both non-programming and programming projects, and sample code. The project results in a greeting audio playing when motion is detected, demonstrated through video demos.

Hardware Preparation

img img img
BOS0013 Motion Sensor BOS0017 LED Module BOS0022 Voice Recorder Module
img img img
BOS0030 Splitter Module BOS0035 Mainboard-3IO MBT0039 micro:bit
img
BOS0040 micro:bit BOSON Expansion Board

Tip: micro:bit and its expansion board will be used in programming projects.

Software Preparation

Mind+ Sample Code:

MakeCode Sample Code:

Wiring Diagram

Non-programming Project

Connection Diagram:

Programming Project

Connection Diagram:

Other Preparation Work

micro:bit and its expansion board will be used in programming projects.

Result

When the motion sensor detects someone, the LED lights up and the speaker plays the recorded greeting audio.

Video Demo

Non-programming Programming

Additional Information

Program Flowchart:

Was this article helpful?

TOP