“RTC 1307”的版本间的差异
来自YFRobotwiki
第1行: | 第1行: | ||
+ | |||
+ | [[Image:RTCDS1307.jpg|350px|thumb|RTCDS1307模块]] | ||
+ | |||
+ | |||
+ | === 产品简介 === | ||
+ | <br> | ||
+ | 温度传感器 - LM35模块是基于由美国国家半导体公司生产的线性半导体温度传感器而设计的模块,可用来对环境温度进行检测。 | ||
+ | |||
+ | |||
+ | http://yfrobot.com/data/attachment/forum/201306/06/191225xfzcy6f6d8zcgfc2.jpg | ||
+ | |||
+ | |||
+ | === 规格参数 === | ||
+ | <br> | ||
+ | *供电电压:DC3.3V~5V | ||
+ | *输出信号:模拟 | ||
+ | *温度测量范围:0℃~100℃ | ||
+ | *精度:0.5℃ (在+25℃时) | ||
+ | *灵敏度:10mV/℃ | ||
+ | *安装孔径:3MM | ||
+ | *模块尺寸:28*21*9.5MM (长*宽*高) | ||
+ | *孔间距:15MM | ||
+ | *模块重量:2.3g | ||
+ | |||
+ | |||
+ | |||
+ | === 引脚说明 === | ||
+ | <br> | ||
+ | *1. G -- Gnd(地) | ||
+ | *2. V -- Vcc(电源+5V) | ||
+ | *3. S -- Sign(信号) | ||
+ | |||
+ | |||
+ | |||
+ | === 应用示例 === | ||
+ | <br> | ||
+ | '''电路连接''' | ||
+ | <br> | ||
+ | :'''LM35模块'''的 G、V、S分别连接 '''Arduino UNO'''的GND、VCC(+5V)、A0引脚。 | ||
+ | |||
+ | '''电路连接示意图''' | ||
+ | |||
+ | <img src="http://yfrobot.gitee.io/wiki/img/温度传感器.png" alt="温度传感器LM35" /> | ||
+ | |||
+ | |||
+ | |||
+ | :'''示例代码''' | ||
+ | |||
+ | <source lang="c"> | ||
+ | //thermometer - Measuring temperature, record temperature fluctuations | ||
+ | |||
+ | int lm35Pin = A0; | ||
+ | |||
+ | int temp = 0; | ||
+ | int tempMin = 100; | ||
+ | int tempMax = -100; | ||
+ | |||
+ | void setup() { | ||
+ | // put your setup code here, to run once: | ||
+ | Serial.begin(9600); | ||
+ | } | ||
+ | |||
+ | void loop() { | ||
+ | // put your main code here, to run repeatedly: | ||
+ | for (int i = 0; i <= 9; i++) { | ||
+ | int signVal = analogRead(lm35Pin); | ||
+ | temp += (signVal * 5 * 100) / 1024; | ||
+ | signVal = 0; | ||
+ | delay(80); | ||
+ | } | ||
+ | temp = temp / 10; | ||
+ | |||
+ | if (temp > tempMax) { | ||
+ | tempMax = temp; | ||
+ | } | ||
+ | if (temp < tempMin) { | ||
+ | tempMin = temp; | ||
+ | } | ||
+ | |||
+ | Serial.print("Temp:"); | ||
+ | Serial.print(temp); | ||
+ | Serial.print(" Cels,"); | ||
+ | Serial.print(" Min:"); | ||
+ | Serial.print(tempMin); | ||
+ | Serial.print(" Max:"); | ||
+ | Serial.println(tempMax); | ||
+ | temp = 0; | ||
+ | delay(500); | ||
+ | } | ||
+ | </source> | ||
+ | |||
+ | 程序下载地址:[https://eyun.baidu.com/s/3c2hGJpY thermometer] | ||
+ | |||
+ | |||
+ | :'''串口监视结果''' | ||
+ | <br> | ||
+ | [[Image:LM35串口监视结果.png|center|LM35串口监视结果]] | ||
+ | |||
+ | ===参考资料=== | ||
+ | <br> | ||
+ | * [http://www.yfrobot.com/wiki/images/5/52/Lm35_datasheet.pdf LM35 数据参考手册] [https://eyun.baidu.com/s/3hr9IASs 备用地址] | ||
+ | * [http://www.datasheetcatalog.com/info_redirect/datasheet/nationalsemiconductor/DS005516.PDF.shtml 不同型号数据手册下载] | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | |||
+ | [[首页 | 返回首页]] | ||
+ | |||
+ | 更多建议和问题欢迎反馈至 [http://www.yfrobot.com YFRobot论坛] | ||
+ | |||
+ | 购买方式:[http://yfrobot.taobao.com/ YFRobot 电子工作室] | ||
2020年12月23日 (三) 09:49的版本
产品简介
温度传感器 - LM35模块是基于由美国国家半导体公司生产的线性半导体温度传感器而设计的模块,可用来对环境温度进行检测。
规格参数
- 供电电压:DC3.3V~5V
- 输出信号:模拟
- 温度测量范围:0℃~100℃
- 精度:0.5℃ (在+25℃时)
- 灵敏度:10mV/℃
- 安装孔径:3MM
- 模块尺寸:28*21*9.5MM (长*宽*高)
- 孔间距:15MM
- 模块重量:2.3g
引脚说明
- 1. G -- Gnd(地)
- 2. V -- Vcc(电源+5V)
- 3. S -- Sign(信号)
应用示例
电路连接
- LM35模块的 G、V、S分别连接 Arduino UNO的GND、VCC(+5V)、A0引脚。
电路连接示意图
- 示例代码
//thermometer - Measuring temperature, record temperature fluctuations int lm35Pin = A0; int temp = 0; int tempMin = 100; int tempMax = -100; void setup() { // put your setup code here, to run once: Serial.begin(9600); } void loop() { // put your main code here, to run repeatedly: for (int i = 0; i <= 9; i++) { int signVal = analogRead(lm35Pin); temp += (signVal * 5 * 100) / 1024; signVal = 0; delay(80); } temp = temp / 10; if (temp > tempMax) { tempMax = temp; } if (temp < tempMin) { tempMin = temp; } Serial.print("Temp:"); Serial.print(temp); Serial.print(" Cels,"); Serial.print(" Min:"); Serial.print(tempMin); Serial.print(" Max:"); Serial.println(tempMax); temp = 0; delay(500); }
程序下载地址:thermometer
- 串口监视结果
参考资料
更多建议和问题欢迎反馈至 YFRobot论坛
购买方式:YFRobot 电子工作室
Arduino 库
参考文档
更多建议和问题欢迎反馈至 YFRobot论坛
购买方式:YFRobot 电子工作室