In this lesson, we will show you how to use the DHT11 sensor module to work with a micro bit and display the real-time value on the I2C 1602 LCD screen.

Parts Needed You will need the following parts:


Connect the DHT11 to the micro bit breakout as below:

Micro bit Breakout DHT11 sensor
3.3v VCC
GND Ground

Connect the I2C 1602 LCD to the breakout board as below:

Micro bit Breakout LCD1602

Run Your Script

If you are not familiar to make code, don’t worry. At first, you can enter this link: to get the reference of microbit block.

Either copy and paste, or re-create the following code into your own MakeCode editor by clicking the open icon in the upper right-hand corner of the editor window. You can also just download this example by clicking the download button in the lower right-hand corner of the code window.

Overhere, the I2C address of this device is “0x27”, so we type “39” in the address bar.If your device  I2C address is “0x3F”, please enter “63” to the address bar.About how to use the micropython with this display, please check


After downloaded this code to your micro bit, pull out the USB line and insert the USB line to the expansion board, you will see “OSOYOO DHT 11” on the LCD screen, then you will see the real-time humidity and temperature data displayed on the LCD.


If the screen is not bright, please check the wires. If the screen is bright, but you do not see the above results, please check you I2C address.

Reference link:

Micro bit lesson — Using the I2C LCD 1602 Display:

Micro bit lesson — Using the DHT11 Sensor: