background image

 

VMA303 

V. 01 

 02/02/2017 

©Velleman nv 

7.

 

Example 

 

int GLED= 13; // Wet Indicator at Digital PIN D13 

int RLED= 12; // Dry Indicator at Digital PIN D12 

int SENSE= 0; // Soil Sensor input at Analog PIN A0 

int value= 0; 

void setup() { 

   Serial.begin(9600); 

   pinMode(GLED, OUTPUT); 

   pinMode(RLED, OUTPUT); 

   Serial.println("SOIL MOISTURE SENSOR"); 

   Serial.println("-----------------------------"); 

void loop() { 

   value= analogRead(SENSE); 

   value= value/10; 

   Serial.println(value); 

   if(value<50) 

   { 

      digitalWrite(GLED, HIGH); 

   } 

   else 

   { 

      digitalWrite(RLED,HIGH); 

   } 

   delay(1000); 

   digitalWrite(GLED,LOW); 

   digitalWrite(RLED, LOW); 

}

 

 

 

Summary of Contents for VMA303

Page 1: ...VMA303 ARDUINO COMPATIBLE SOIL MOISTURE SENSOR WATER LEVEL SENSOR MODULE USER MANUAL ...

Page 2: ...aning and user maintenance shall not be made by children without supervision Indoor use only Keep away from rain moisture splashing and dripping liquids 3 General Guidelines Refer to the Velleman Service and Quality Warranty on the last pages of this manual Familiarise yourself with the functions of the device before actually using it All modifications of the device are forbidden for safety reason...

Page 3: ...elleman VMA100 Arduino Uno and the soil moisture sensor module The soil moisture sensor module built around the LM393 comparator not included gives an active low L level output when the soil is dry determined by a pre set threshold value This digital output wet soil L dry soil H is routed to one I O terminal D2 of the Arduino microcontroller Based on this input at D2 Arduino gives an active high H...

Page 4: ...oil Sensor input at Analog PIN A0 int value 0 void setup Serial begin 9600 pinMode GLED OUTPUT pinMode RLED OUTPUT Serial println SOIL MOISTURE SENSOR Serial println void loop value analogRead SENSE value value 10 Serial println value if value 50 digitalWrite GLED HIGH else digitalWrite RLED HIGH delay 1000 digitalWrite GLED LOW digitalWrite RLED LOW ...

Page 5: ...is product and the latest version of this manual please visit our website www velleman eu The information in this manual is subject to change without prior notice COPYRIGHT NOTICE The copyright to this manual is owned by Velleman nv All worldwide rights reserved No part of this manual may be copied reproduced translated or reduced to any electronic medium or otherwise without the prior written con...

Page 6: ...n shocks falls dust dirt humidity and by the article as well as its contents e g data loss compensation for loss of profits consumable goods parts or accessories that are subject to an aging process during normal use such as batteries rechargeable non rechargeable built in or replaceable lamps rubber parts drive belts unlimited list flaws resulting from fire water damage lightning accident natural...

Reviews: