Example Code for micro:bit-Intelligent Streetlight

This article offers comprehensive guidance on setting up an intelligent streetlight project using micro:bit, including hardware lists, wiring diagrams, and sample code to facilitate learning and practical application.

Hardware Preparation

BOS0013 BOS0004 BOS0017
BOS0013 Motion Sensor BOS0004 Ambient Light Sensor BOS0017 LED Module
BOS0040 mbt0039
BOS0040 micro:bit MBT0039 micro:bit

Software Preparation

Mind+、MakeCode

Wiring Diagram

Connection 3

Tip: Thresholds for the ambient light sensor and sound sensor should be adjusted according to actual environment.

Flowchart

Flowchart

Result

Video Demo

Programming Demo

Was this article helpful?

TOP