DHT 22溫溼度模組(For Pico)

Raspberry Pi Pico 專案說明

使用「Raspberry Pi Pico」連接「DHT 22溫溼度模組」, 每3秒讀取DHT22溫溼度感測器模組溫度和濕度數值。

DHT 22溫溼度模組電路圖

DHT 22溫溼度模組數位訊號輸出, 可以接「D0 ~ D28」的Raspberry Pi Pico擴充板訊號端上。 本範例連接到「D7」。

Arduino IDE程式

每3秒鐘讀取DHT溫溼度感測器的溫度和濕度一次,並顯示在序列埠監控視窗上。

Arduino 程式(DHT22.ino)如下:

程式執行結果

Last updated

Was this helpful?