+21622886281
LED Micro:bit Project

Intelligent Traffic Light with Micro:bit

Objective of this project:

The objective of this project is to achieve an intelligent traffic light controlled by Micro:bit.

This system uses two Micro:bit cards to create an automatic driving system that can detect changes in a traffic light and use them to start and stop our Line Plotter Maqueen robot.

  • If the LED lights up in red and the sound sensor HC-SR04 detects the presence of the robot, the Micro:bit board of the traffic light sends by radio the word ‘stop’ to that of the Maqueen robot to stop it.
  • If the LED lights up green, the Maqueen robot starts rolling.

necessary components

  • 2 Micro:bit board
  • Maquuen robot
  • sound sensor HC-SR04
  • RGB LED module
  • GPIO board
  • test plate
  • connecting wires

Mounting the traffic light

To make the assembly we can connect:

For the HC-SR04 sound sensor:

  • VCC pin to  3.3V pin of Micro:bit
  • Trig pin tp P2 pin of Micro:bit
  • Echo pin to P1 pin of Micro:bit
  • GND pin to GND pin of Microbit

For LED RGB module:

  • GND pin to GND pin of Microbit
  • R pin to P0 pin of Micro:bit
  • G pin to pin P8  of Micro:bit

The mounting methods are numerous and here are some examples:

Mounting (1)

Mounting (2)

Makecode program

Here is the smart traffic light program controlled by Micro:bit:

Maqueen program

Here is the program of the robot Maqueen controlled by Micro:bit:




0 commentaire


Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top