Arduino 气象站
组件和用品
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
![]() |
| × | 1 | |||
![]() |
| × | 1 |
关于这个项目
介绍
我建立了一个 Arduino 气象站。它使用 DHT 11(它也适用于 DHT21 DHT22)。

视频
我在这个视频中解释了一切。所以如果你看它可能对你更容易!
第一个草图

第一个草图向串行监视器显示传感器值。
传感器:
- 引脚 1 - 5
- 引脚 2 - 5v
- 引脚 3 - GND
第二个草图

在此草图中,我们将在 LCD 上显示这些值。我在这个项目中使用了 I²C LCD。
传感器:
- 引脚 1 - 5
- 引脚 2 - 5v
- 引脚 3 - GND
液晶显示器:
- SDA - A4
- SCL - A5
- 地线 - 地线
- VCC - 5V
第三个草图

最后的草图还在 LCD 上显示了一个实时时钟。它使用一个 DS1302 模块。有关此时钟的更多信息,您可以查看我在之前的项目中制作的 Arduino 时钟。
传感器:
- 引脚 1 - 5
- 引脚 2 - 5v
- 引脚 3 - GND
DS1302:
- RST - 2
- 数据 - 3
- 时钟 - 4
液晶显示器:
- SDA - A4
- SCL - A5
- 地线 - 地线
- VCC - 5V
代码
代码可以通过本项目的CODE部分找到。图书馆在地图中。您必须先解压缩地图。然后安装它们。
第一张草图
上传草图:TEST。 需要的库:Adafruit_Sensor-master , DHT-sensor-library-master .
第二个草图
上传草图:LCD
需要的库:NewliquidCrystal , Adafruit_Sensor-master , DHT-sensor-library-master
第三个草图
上传草图:LCDCLOCK
需要的库:DS1302 , NewliquidCrystal , Adafruit_Sensor-master , DHT-sensor-library-master
订阅
如果您喜欢这些类型的视频,您可能还想查看我即将推出的所有作品。然后你可以在这里订阅我的频道:http://bit.ly/TechMakerYouTube
代码
代码气象站
图书馆在地图中。您必须先解压缩地图。然后安装它们https://github.com/TechMakerOfficial/ArduinoWeatherStation制造工艺