5 Gets the board temperature

From Banana Pi Wiki
Revision as of 02:23, 20 February 2019 by Sinovoip (talk | contribs)
Jump to navigation Jump to search
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

[[File:Micropython2.png|thumb|[[3 Bottom IO port control] ]] [[File:Micropython2.png|thumb|4 Panel key detection ]]

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


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