Temperature Sensor
![IMG_20211027_122526576.jpg](/proxy/?url=https://content.instructables.com/F3C/M467/KV9J4KO4/F3CM467KV9J4KO4.jpg&filename=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](/proxy/?url=https://content.instructables.com/FJV/5B0C/KVF8V76N/FJV5B0CKVF8V76N.jpg&filename=mooo.jpg)
![moooopopopo.jpg](/proxy/?url=https://content.instructables.com/F03/YFKP/KVF8V986/F03YFKPKVF8V986.jpg&filename=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](/proxy/?url=https://content.instructables.com/FJF/Q6FW/KV9J4M3U/FJFQ6FWKV9J4M3U.png&filename=scree.png)
![screee.png](/proxy/?url=https://content.instructables.com/FBM/DXBH/KV9J4M6N/FBMDXBHKV9J4M6N.png&filename=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](/proxy/?url=https://content.instructables.com/FDM/FAH0/KVAYKQYL/FDMFAH0KVAYKQYL.png&filename=ssssssssssssssssssssssss.png)
![eeeeeeeeeeeeeeeessss.png](/proxy/?url=https://content.instructables.com/FGA/WO5B/KVAYKQZN/FGAWO5BKVAYKQZN.png&filename=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](/proxy/?url=https://content.instructables.com/FXF/H261/KVAYKR8A/FXFH261KVAYKR8A.png&filename=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](/proxy/?url=https://content.instructables.com/FTK/FHJ9/KVAYKTAA/FTKFHJ9KVAYKTAA.png&filename=delighla.png)
![face.png](/proxy/?url=https://content.instructables.com/FZD/XQF5/KVAYKTRS/FZDXQF5KVAYKTRS.png&filename=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