Difference between revisions of "5 Gets the board temperature"
Line 11: | Line 11: | ||
[[File:Micropython2.png|thumb|[[3 Mpfshell details]] ]] | [[File:Micropython2.png|thumb|[[3 Mpfshell details]] ]] | ||
[[File:Micropython2.png|thumb|[[4 Pycharm IDE programming]] ]] | [[File:Micropython2.png|thumb|[[4 Pycharm IDE programming]] ]] | ||
+ | [[File:Micropython2.png|thumb|[[3 Bottom IO port control] ]] | ||
+ | [[File:Micropython2.png|thumb|[[4 Panel key detection]] ]] | ||
[[File:Micropython5.png|thumb|[[1. Panel scrolling text]] ]] | [[File:Micropython5.png|thumb|[[1. Panel scrolling text]] ]] | ||
− | [[File:Micropython2.png|thumb|[[2. Panel display images]] ]] | + | [[File:Micropython2.png|thumb|[[2. Panel display images]] ]] |
− | [[File:Micropython2.png|thumb|[[3 Bottom IO port control] ]] | + | [[File:Micropython2.png|thumb|[[3 Bottom IO port control]] ]] |
[[File:Micropython2.png|thumb|[[4 Panel key detection]] ]] | [[File:Micropython2.png|thumb|[[4 Panel key detection]] ]] | ||
[[File:Micropython2.png|thumb|[[5 Gets the board temperature]] ]] | [[File:Micropython2.png|thumb|[[5 Gets the board temperature]] ]] | ||
Line 25: | Line 27: | ||
[[File:Micropython2.png|thumb|[[12 S2m Scratch2]] ]] | [[File:Micropython2.png|thumb|[[12 S2m Scratch2]] ]] | ||
[[File:Micropython2.png|thumb|[[13 Codelab Scratch3]] ]] | [[File:Micropython2.png|thumb|[[13 Codelab Scratch3]] ]] | ||
+ | |||
=thermistor= | =thermistor= |
Revision as of 18:23, 19 February 2019
[[File:Micropython2.png|thumb|[[3 Bottom IO port control] ]] [[File:Micropython2.png|thumb|4 Panel key detection ]]
Contents
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