The soil moisture sensor is used to measure the moisture content of soil. It is commonly used in gardening, agriculture, and environmental monitoring systems.
1234
Downloads
567
Likes
VCC | Power supply (3.3V or 5V, depending on the module) |
GND | Ground (-) |
AO | Analog output signal |
1#include <MoistureSensor.h>
2
3MoistureSensor moistureSensor;
4
5void setup() {
6 Serial.begin(9600);
7 moistureSensor.begin();
8}
9
10void loop() {
11 int moisturePercentage = moistureSensor.readPercentage();
12
13 Serial.print("Moisture: ");
14 Serial.print(moisturePercentage);
15 Serial.println(" %");
16
17 delay(1000);
18}
Description of application 1.
Description of application 2.
Description of application 3.