Temperature Sensor

by tractorjoseph in Circuits > Electronics

405 Views, 0 Favorites, 0 Comments

Temperature Sensor

IMG_20211027_122526576.jpg

Hello i am joseph and i am 10. In this tutorial I will show you how to make a temperature sensor/reader with micro:bit.

Supplies

micro:bit

dht11 temp humidity sensor

micro:bit breakout

wires female to female

makecode installed

usb cord

(optional) OLED 12864

Connect

mooo.jpg
moooopopopo.jpg

connect the temperature sensor to the micro:bit

-- to ground

+ to 3.3

out to pin 0

on some sensors out may be marked S

Dht11

scree.png
screee.png

open a new project in makecode

drop down advanced and click extensions and add dht11 in your extensions

Change Pin Pull Up

ssssssssssssssssssssssss.png
eeeeeeeeeeeeeeeessss.png

get a query and put it in a forever

change pin pull up to false if you want it to fail less

Display Temp

temp.png

put a show string t under the query dht11

put a wait 500 milliseconds under the show string

put a read temperature in a show number and put under the wait

download to your micro:bit

Oled

delighla.png
face.png

connect sda to pin 20 scl to pin 19 vin or + to 3.3 gnd or - to gnd on the micro:bit

delete all you did in step 4

add the OLED extension

put a init OLED with addr in the on start leave it at 60 unless it doesn't work, then change it to 61

under query dht11 put a show string "t"

under that put show number "read temperature" MAKE SURE X IS 2