Difference between revisions of "5 Gets the board temperature"

From Banana Pi Wiki
Jump to: navigation, search
Line 1: Line 1:
[[File:Webduino_gif.gif|thumb|Overview: [[BPI-Bit]]]]
[[File:Micropython3.png|thumb|[[1 Get the development suite]] ]]
[[File:Micropython3.png|thumb|[[1 Get the development suite]] ]]
[[File:Micropython2.png|thumb|[[2 Wired connection board]] ]]
[[File:Micropython2.png|thumb|[[2 Wired connection board]] ]]

Revision as of 20:16, 19 February 2019

Overview: BPI-Bit

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


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:
   temp = temperature() # get temperature ℃

testing effect

Led panel display content


Print the data


The temperature measured