Example Code for micro:bit-Item Sorting System

This article offers a detailed guide on creating an item sorting system with micro:bit, including hardware and software preparation, wiring diagrams, and sample code to support educational and hobbyist projects.

Hardware Preparation

img
BOS0010 Smart Grayscale Sensor BOS0020 Buzzer module BOS0040 Micro:bit BOSON Expansion Board
img
MBT0039 Micro:bit

Software Preparation

Makecode or Mind+

Wiring Diagram

sorting

Other Preparation Work

Tips: The value should be adjusted according to the height and brightness.

Result

When the smart grayscale sensor detects an obstacle, the buzzer will sound.

Additional Information

Flowchart:

Was this article helpful?

TOP