
土壤濕度感測模組簡介

土壤濕度感測模組,屬於類比訊號感測器,可感測濕度。須將兩金屬板同時觸碰感測,專門應用於植栽土壤溼度感測或是應用於水位感測。
範例說明
本範例使用 Arduino Uno Rev3(原裝) ,連接Circus 土壤濕度感測模組,本範例中的控制腳位設為 「A0」。
使用設備
接線圖
商品規格
感測器類型 | 數位訊號 |
連接電壓 | 3.3V ~ 5V |
主要元件 | 金屬部位 |
範例程式
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#define soilMoisture A0 | |
void setup() { | |
Serial.begin(9600); | |
pinMode(soilMoisture, INPUT); | |
} | |
void loop() { | |
Serial.println(analogRead(soilMoisture)); | |
} |