Grove - Moisture Sensor User Manual Release date: 2015/9/22 Version: 1.0 Wiki: http://seeedstudio.com/wiki/Grove_-_Moisture_Sensor Bazaar: http://www.seeedstudio.com/depot/Grove-Moisture-Sensor- p-955.
Document Revision History Revision Date Author Description 1.0 Sep 22, 2015 Jiankai.
Contents Document Revision History ·········································································2 1. Introduction ·······················································································2 2. Features ····························································································3 3. Specification ······················································································4 4.
Disclaimer For physical injuries and possessions loss caused by those reasons which are not related to product quality, such as operating without following manual guide, natural disasters or force majeure, we take no responsibility for that. Under the supervision of Seeed Technology Inc., this manual has been compiled and published which covered the latest product description and specification. The content of this manual is subject to change without notice.
1. Introduction This Moisture Sensor can be used to detect the moisture of soil or judge if there is water around the sensor, let the plants in your garden reach out for human help. They can be very easy to use, just insert it into the soil and then read it. With the help of this sensor, it will be realizable to make the plant remind you : hey, i am thirsty now, please give me some water.
2. Features Soil moisture sensor based on soil resistivity measurement Easy to use 2.0cmX6.
3. Specification Item Condition Min Typical Max Unit Voltage - 3.
4.
5. Usage With Arduino This is a summary of the moisture sensor which can be used to detect the moisture of the soil. When the soil moisture deficits, the sensor output value will decrease. You can know whether a plant needs water or not by observing the results that the sensor outputs. The following sketch demonstrates a simple application of sensing the moisture of the soil.
void setup() { // declare the ledPin as an OUTPUT: Serial.begin(9600); } void loop() { // read the value from the sensor: sensorValue = analogRead(sensorPin); delay(1000); Serial.print("sensor = " ); Serial.println(sensorValue); } Upload the code, please click here if you do not know how to upload.
/* Moisture-Sensor The following sketch demonstrates a simple application of sensing the moisture of the soil. You can know whether a plant needs water or not by observing the results that the sensor outputs. The circuit: * Moisture-Sensor attached to pin 24 (J6 plug on Grove Base BoosterPack) * one side pin (either one) to ground * the other side pin to +VCC * LED anode (long leg) attached to RED_LED * LED cathode (short leg) attached to ground * Note: This example code is in the public domain.
#define ON HIGH /* led on */ #define OFF LOW /* led off */ #define _handle_led(x) digitalWrite(BLINK_LED, x) /* handle led */ /* Global Varibles */ TM1637 tm1637(CLK, DIO); /* 4-digital display object */ int analog_value = 0; /* varible to store the value coming from rotary angle sensor */ int8_t bits[4] = {0}; /* array to store the single bits of the value */ /* the setup() method runs once, when the sketch starts */ void setup() { /* Initialize 4-digital display */ tm1637.init(); tm1637.
With Raspberry Pi 1. You should have got a raspberry pi and a grovepi or grovepi+. 2. You should have completed configuring the development environment, otherwise follow here. 3. Connection Plug the sensor to grovepi socket A0 by using a grove cable. 4.Navigate to the demos' directory: cd yourpath/GrovePi/Software/Python/ To see the code nano grove_moisture_sensor.
6.
7. Support If you have questions or other better design ideas, you can go to our forum or wish to discuss.