温度传感器
组件和用品
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
![]() |
| × | 1 |
应用和在线服务
![]() |
|
关于这个项目
该项目感知周围的温度,然后将其转换为伏特,伏特为
摄氏度,摄氏度到华氏度,然后打印华氏度。


代码
- 温度
tempArduino
#includeLiquidCrystal lcd(12, 11, 5, 4, 3, 2);const int tmp =A0;const int p =8;void setup() { lcd.begin(16, 2) ); Serial.begin(9600); pinMode(p, 输出); // 把你的设置代码放在这里,运行一次:}void loop() { digitalWrite(p,LOW); int Temp =analogRead(tmp);浮动电压 =(Temp / 965.0) * 5;浮动 c =(伏特 - .5) * 100;浮动 f =(c * 9 / 5 + 32); Serial.println(f); lcd.setCursor(5, 0);液晶.打印(f);延迟(3000); // 把你的主要代码放在这里,重复运行:}
示意图
临时文件

制造工艺