5 Gets the board temperature

From Banana Pi Wiki
Jump to navigation Jump to search
Overview: BPI-Bit
1 Get the development suite
2 Wired connection board
3 Try burning the board
4 Hello, World!
5 Light up all kinds of LED


1 Auto series one key burn
2 ESPBlocks Beginner's only
3 Mpfshell details
4 Pycharm IDE programming


1. Panel scrolling text
2. Panel display images
3 Bottom IO port control
4 Panel key detection
5 Gets the board temperature
6 Play MIDI music
7 Photosensitive gesture
8. MPU-9250 9-axis sensor
9. Make a compass
10 Free to define gestures
11 Random number generator
12 S2m Scratch2
13 Codelab Scratch3
1 The basic algorithm
2 WiFI wireless connection
3 WiFI wireless programming
MQTT communication applications


thermistor

This module allows you to get ambient temperature.Before using it, it is recommended to put the board under cooling before collecting, otherwise the reading temperature will deviate from the surrounding temperature, because the board will generate heat, so the most influential heat source around it is the temperature of the board itself, so the ambient temperature will become the temperature of the board.

So before the board starts to heat up, the initial temperature must be the ambient temperature, and then gradually become the board temperature.

sample code

from microbit import *
while True:
   sleep(100)
   temp = temperature() # get temperature ℃
   print(temp)
   display.show(str(temp))

testing effect

Led panel display content

Print the data

The temperature measured