Example Code for micro:bit-Shining Tiara

twine the LED strip around a tiara. When the tilt sensor detected there is a "tilt", the LED strip will light up.

Hardware Preparation

Mainboard
BOS0019 Multicolor String Light BOS0005 Tilt Sensor BOS0035 Mainboard-3IO
micro:bit microbit expansion board
MBT0039 micro:bit BOS0040 micro:bit BOSON Expansion Board

Software Preparation

  • Mind+
  • MakeCode

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.

Sample Code

Mind+ Sample Code:

MakeCode Sample Code:

Result

Video Demo

Non-programming Programming

Additional Information

Program Flowchart:

Was this article helpful?

TOP