Climapse - Microcontroller micro:bit

Cover Climapse


Secondary School

Physics, Computer Science


Keywords: Data acquisition, microcontroller
Disciplines: Physics, mathematics, ICT
Age level of the students: 12-14 
Time frame: Depending on previous knowledge of the students, 1-2 lessons



Parts needed
Built-in sensors
External sensors
The tutorials


The micro:bit is a simple microcontroller that can be programmed with blocks. This means that it is very easy for younger students and already has some sensors on its board. If students collaborate, you can also build a measuring device that sends the data to a logging device. The logged data can also be exported to a spreadsheet application and analysed further.

In principle, you can do the following task without any hardware and just use the virtual simulation. Using the virtual simulation is always recommended to ensure the code works before uploading it to your micro:bit and to learn the functionality of the micro:bit.

Teaser Climapse

Parts needed

  • micro:bit controller
  • Tablet or PC to program the device
  • DHT11 / DHT22 sensors
  • Crocodile clips and cable


Built-in temperature sensors

In this task, students log the data from the built-in temperature sensors as a starting point. As a result, they do not have to wire any external sensors.
The worksheets are included inside the editor, so it is easy to use them. There are several languages available that are chosen due to your browser settings. To start the task you just have to provide the link and a device with a browser connected to the internet.

The micro:bit can send and receive data. So, by programming two devices the students can work in groups. One group builds a sending device that collects the data and the other group a receiving device that analyses and shows the data. This enforces collaborative working within the class and supports the students’ social skills.

External sensors - Use DHT11/DHT22

The second task with the micro:bit is using a cheap external sensor. This is more challenging because the students have to include an external library to read the data from DHT11/DHT22 sensors. And of course, the students have to wire the external device correctly. On the other side, they have a more accurate device and learn to build a simple electrical circuit.

We also provide a group edition for stronger students who are able to collaborate. One group builds the measuring and sending device and the other group builds a receiving device. The data can be analysed with any spreadsheet application therefore the editor has the option to export a *.csv file.

micro:bit with external sensor
© Science on Stage
Setup micro:bit with external sensor

The tutorials

All tutorials are in the MakeCode editor for micro:bit and you only need a browser and internet connection to run them.

Tutorial 1

Students learn to read out the temperature from the sensor and to send it to the PC to work with it. Go to tutorial 1

Tutorial 2

Students send sensor data to a micro:bit and configure the sender. Go to tutorial 2

Tutorial 3

Students send the sensor data to a micro:bit and configure the receiver. They receive the data and let the PC draw a diagram. Go to tutorial 3

It is possible to write your own MakeCode tutorials for your students and publish them via GitHub.

The tutorials are saves as *.md files and can be opened in the MakeCode editor. It is possible to have the same tutorial in different languages and which version is opened is decided by the settings in MakeCode if you dont specify otherwise in the link.

Link to tutorial 1 on github:

Link to all tutorials without language specification

The tutorials are available in German and English and you can also force the language setting by adapting the link:

English version of tutorial 1

German version of tutorial 1

Authors of Climapse: Johannes Almer (DE), Marco Nicolini (IT), Teresita Gravina (IT)


  2. MakeCode editor for micro:bit



Close search