匿名
未登录
登录
丢石头百科
搜索
查看“Micro:bit系列教程8:温度检测”的源代码
来自丢石头百科
名字空间
页面
讨论
更多
更多
页面选项
查看
查看源代码
历史
←
Micro:bit系列教程8:温度检测
因为以下原因,您没有权限编辑本页:
您所请求的操作仅限于该用户组的用户使用:
用户
您可以查看与复制此页面的源代码。
<span style="font-size:12.0pt; line-height:150%;font-family:宋体">本章将介绍Micro:bit对外界温度的检测,由于Micro:bit并不自带温度传感器,而是采用NFR51822芯片内置的温度传感器进行温度检测,所以检测的温度更接近芯片温度,可能与周围环境温度存在一定误差。 <h1 style="line-height:150%"><span lang="EN-US" style="font-size:15.0pt; line-height:150%;font-family:黑体;font-weight:normal;mso-bidi-font-weight:bold">1.<span style="font-size:15.0pt;line-height:150%;font-family:黑体;font-weight:normal; mso-bidi-font-weight:bold">基本介绍 </h1> Micro:bit并未内置温度传感器,而是采用NRF51822芯片进行温度检测,NRF51822芯片的位置如下图所示: <span lang="EN-US" style="mso-no-proof: yes"><v:shapetype coordsize="21600,21600" filled="f" id="_x0000_t75" o:preferrelative="t" o:spt="75" path="m@4@5l@4@11@9@11@9@5xe" stroked="f"><v:stroke joinstyle="miter"><v:formulas><v:f eqn="if lineDrawn pixelLineWidth 0"><v:f eqn="sum @0 1 0"><v:f eqn="sum 0 0 @1"><v:f eqn="prod @2 1 2"><v:f eqn="prod @3 21600 pixelWidth"><v:f eqn="prod @3 21600 pixelHeight"><v:f eqn="sum @0 0 1"><v:f eqn="prod @6 1 2"><v:f eqn="prod @7 21600 pixelWidth"><v:f eqn="sum @8 21600 0"><v:f eqn="prod @7 21600 pixelHeight"><v:f eqn="sum @10 21600 0"></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:f></v:formulas><v:path gradientshapeok="t" o:connecttype="rect" o:extrusionok="f"><o:lock aspectratio="t" v:ext="edit"></o:lock></v:path></v:stroke></v:shapetype><v:shape id="图片_x0020_1" o:spid="_x0000_i1028" style="width:335.25pt;height:192pt;visibility:visible;mso-wrap-style:square" type="#_x0000_t75"><v:imagedata o:title="" src="file:///C:\Users\LINXINWU\AppData\Local\Temp\msohtmlclip1\01\clip_image001.png"></v:imagedata></v:shape><span lang="EN-US" style="font-size:12.0pt;line-height:150%; font-family:宋体"> [[File:100103qjbivis39j9d1dx9.png]] <h1 style="line-height:150%"><span lang="EN-US" style="font-size:15.0pt; line-height:150%;font-family:黑体;font-weight:normal;mso-bidi-font-weight:bold">2.Micro:bit<span style="font-size:15.0pt;line-height:150%;font-family:黑体;font-weight:normal; mso-bidi-font-weight:bold">检测温度 </h1> <span style="font-size:12.0pt; line-height:150%;font-family:宋体">首先打开makecode,采用积木块的方式编写如下程序: <span style="font-size:12.0pt; line-height:150%;font-family:宋体"> [[File:100103ywvh85mm8zl4584z.png]] <span lang="EN-US" style="mso-no-proof: yes"><v:shape id="图片_x0020_2" o:spid="_x0000_i1027" style="width:415.5pt; height:164.25pt;visibility:visible;mso-wrap-style:square" type="#_x0000_t75"> <v:imagedata o:title="" src="file:///C:\Users\LINXINWU\AppData\Local\Temp\msohtmlclip1\01\clip_image002.png"> </v:imagedata></v:shape> <span style="font-size:12.0pt; line-height:150%;font-family:宋体">下载,接下来点击显示数据(设备)按钮: <span style="font-size:12.0pt; line-height:150%;font-family:宋体"> [[File:100104vcw99ner7oo7j748.png]] <v:shape id="图片_x0020_3" o:spid="_x0000_i1026" style="width:242.25pt;height:330pt;visibility:visible; mso-wrap-style:square" type="#_x0000_t75"> <v:imagedata o:title="" src="file:///C:\Users\LINXINWU\AppData\Local\Temp\msohtmlclip1\01\clip_image003.png"> </v:imagedata></v:shape><span lang="EN-US" style="font-size:12.0pt;line-height:150%; font-family:宋体"> 将显示温度数据,如下图所示: [[File:100104tj5ok3rdj6oofj6j.png]] <span lang="EN-US" style="mso-no-proof: yes"><v:shape id="图片_x0020_4" o:spid="_x0000_i1025" style="width:384pt; height:246.75pt;visibility:visible;mso-wrap-style:square" type="#_x0000_t75"> <v:imagedata o:title="" src="file:///C:\Users\LINXINWU\AppData\Local\Temp\msohtmlclip1\01\clip_image004.png"> </v:imagedata></v:shape><span lang="EN-US" style="font-size:12.0pt;line-height:150%; font-family:宋体"> <span style="font-size:12.0pt; line-height:150%;font-family:宋体">在以上的测试中,将Micro:bit的NFR51822芯片接触,一段时间后,温度开始慢慢上升,此时室温约为26摄氏度吗,与水杯外侧接触后,温度上升到28摄氏度,符合预期。
返回至
Micro:bit系列教程8:温度检测
。
导航
导航
首页
最近更改
随机页面
MediaWiki帮助
首页
首页
树莓派
主机
配件包
外壳
键鼠
电源
扩展板
显示屏
墨水屏
摄像模块
通信模块
继电器
电机驱动板
游戏机
产品分类
树莓派
Arduino
micro:bit
STM32
Espressif
WiFi模块
蓝牙模块
无线模块
LoRa模块
4G模块
GSM
GPRS
以太网
导航模块
北斗卫星
GPS
LCD
墨水屏
OLED
摄像头
USB模块
串口模块
RS232
RS485
CAN
传感器
温度模块
湿度模块
气压模块
继电器
电机模块
指纹模块
电平转换
音频模块
编程器
Wiki工具
Wiki工具
特殊页面
页面工具
页面工具
用户页面工具
更多
链入页面
相关更改
页面信息
页面日志