Physical Computing

Workshop challenge


The challenge we have set for you is to connect some electrical components to a micro:bit for physical computing.

Simple circuits


A simple electrical circuit to light up an LED will need a source of electrical power.

This would usually be a battery.

An LED.

Some wires.


Computer Control


Computers are used to control billions of devices.  


A good example is the traffic light.






You are going to learn how to use a micro:bit computer to control a light.


The light you control will be a red LED.




Connecting an LED to the micro:bit


The micro:bit edge strip has five holes called pins for connecting external electrical components. 



Wires are held in the pins using plastic pegs called micro:pegs.


The images below show how to connect a wire to a pin using a micro:peg.







Activity 1

Connect the red LED to the micro:bit as follows:

Copy the picture below.

Push the pegs in firmly so they do not fall out.






Activity 2

In the MakeCode editor, create the code below.



Activity 3

Download the code to the micro:bit and test it.


If the red light starts to flash.

Congratulations!