Micro:bit Physical computing guides
No. 4: Temperature sensors
Connecting a Temperature sensor to a micro:bit
Instructions on how to attach a temperature sensor to a BBC micro:bit.
What you will need
Instructions on how to attach a temperature sensor to a BBC micro:bit.
What you will need
- BBC micro:bit
- Micro USB cable
- Battery pack with 2 x AAA batteries
- 1 x Low voltage temperature sensor (e.g. Tmp36)
- 3 x Crocodile clip leads
Temperature sensor
Wiring instructions
- Disconnect the micro:bit from your computer and disconnect the battery pack.
- With the flat side of the temperature sensor facing you and using crocodile clips, connect the left leg to the 3V pin, the middle leg to Pin 0, and the right leg to GND on the BBC micro:bit.
Programming your Temperature sensor
Copy the below:
Programming your Temperature sensor
Copy the below:
Testing your code
Testing your code
- Download your program to your micro:bit.
- Reconnect your battery and run your program.