Maker.io main logo

BBC micro:bit Pedestrian Crossing Project

49

2026-03-12 | By Kitronik Maker

License: See Original Project micro:bit

Courtesy of Kitronik Maker

Guide by Kitronik Maker

This Pedestrian Crossing project was submitted to us by Thomas Stratford. Thomas started this project to try out the pre-written code that came with the IET Pedestrian Crossing resource. The aim is to use the BBC micro:bit to develop a prototype for a pedestrian crossing for a local secondary school.

Thomas Stratford is an ICT Technician for the Misbourne School. When he isn’t fixing IT problems, he spends his time making, tinkering and building Electronics projects. He is currently learning about the recently released BBC micro:bit.

BBC micro:bit Pedestrian Crossing Project:

In order to create this project in the same way as the example below, you will need to source the following components: Parts List:

  • A BBC micro:bit.

  • 1 x Kitronik Prototyping System.

  • 2 x Red LEDs.

  • Two Green LEDs.

  • An Orange LED.

  • 1 x Piezo Sounder.

  • A x NPN Transistor.

  • 1 x 2.2kΩ Resistor.

  • 5 x Resistors suitable for your LED’s (I used 220Ω resistors).

  • 7 x M/F Jumper wires.

  • 3 x M/M Jumper wires.

Note: With the exception of the 5 x 220Ω resistors, all of the parts used in this Project can be found in the Kitronik Inventors Kit. If you have the Inventors Kit, you can substitute the 220Ω resistors for the 47Ω resistors that come with the Kit.

Stage 1 – The Traffic Lights:

First, I connected three LED’s to P0, P1 & P2 via series resistors as show in the picture below. Stage 1 Suggested Breadboard Layout:

lights_2

BBC micro-bit

Stage 1 Completed Example:

stage_4

Stage 2 – Adding Pedestrian Crossing LEDS:

This worked well so I thought I would try adding two more LEDs via series resistors to ports (P8 & P12). I modified the pre-written program so that the two additional LEDs would also be controlled.

Stage 2 Suggested Breadboard Layout:

layout_5

BBC micro-bit

Stage 2 Completed Example:

completed_7

Stage 3 – Adding The Crossing Beeper:

The final part of this project was to add a piezo sounder to simulate the crossing beeper. I connected a piezo sounder to port (P16) via a driver transistor. I modified the code once more to add this functionality.

Stage 3 Suggested Breadboard Layout:

layout_8

BBC micro-bit

Stage 3 Completed Example:

completed_10

Note: The Breadboard layout shows a buzzer with leads, but the completed example shows a buzzer that fits directly to the breadboard, therefore the wire link or jumper wire is connected differently. It would be better to follow the breadboard image layout as this is easier to follow. Code: The original code was written in Microsoft Touch Develop. This editor has since been taken out of commission and the code has been recreated in the Microsoft MakeCode editor, see below.

BBC micro-bit Code

Microsoft MakeCode | Terms of Use | Privacy | Download

We would like to thank Thomas for sharing his excellent project with us. For up to the minute accounts of Thomas’ projects, follow him on Twitter: @MrTomsWorld.

メーカー品番 MICRO:BIT SINGLE
BBC MICRO-BIT V2 SBC BOARD ONLY
Micro:bit
メーカー品番 4128
JUMPER WIRE M TO F 7.874" 10PCS
Kitronik Ltd.
メーカー品番 MICRO:BIT GO
BBC MICRO-BIT V2 SBC GO BUNDLE
OKdo
Add all DigiKey Parts to Cart
Have questions or comments? Continue the conversation on TechForum, DigiKey's online community and technical resource.