Example Code for micro:bit-Car Reversing Radar

This article guides you through the setup and programming of a micro:bit-based car reversing radar using ultrasonic sensors with detailed hardware and software preparation, wiring diagrams, and sample code for effective obstacle detection during parking.

Hardware Preparation

img img Mainboard
BOS0045 Ultrasonic Distance Sensor BOS0022 Voice Recorder Module BOS0035 Mainboard-3IO
micro:bit microbit expansion board
MBT0039 micro:bit BOS0040 micro:bit BOSON Expansion Board

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

Software Preparation

Makecode or Mind+

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 reversing a car, the speaker will broadcast "please pay attention to the obstacle behind" if the ultrasonic distance sensor detects an obstacle.

Additional Information

Program Flowchart:

Was this article helpful?

TOP