bookssland.com » Design » Automatic Watering System for plants - Adit Nandi (top android ebook reader .TXT) 📗

Book online «Automatic Watering System for plants - Adit Nandi (top android ebook reader .TXT) 📗». Author Adit Nandi



Free e-book «Automatic Watering System for plants - Adit Nandi (top android ebook reader .TXT) 📗» - read online now

Cover Page

Table of Contents

 

Automatic Watering System for plants

- Images

- Materials

- Code

Images

Images

 

Prior Designs:

 

Design #1


Design #2



schematics:


 

Materials

Materials

  • 100 ohm resistor
  • 220 ohm resistor 
  • Arduino Uno
  • BreadBoard- half size
  • Jumper wires
  • Soil Moisture sensor
  • Male headers 
  • RGB Led common anode
  • Water pump (3-5v)

Code

Code

const int VAL_PROBE = 0;  
 const int MOISTURE_LEVEL = 880;
   
 void setup()  
 {  
  Serial.begin(9600);  
  pinMode(13, OUTPUT);  
  pinMode(7, OUTPUT);  
 }  
 void LedState(int state)  
 {  
  digitalWrite(7,state);  
 }  
 void loop()  
 {  
  int moisture = analogRead(VAL_PROBE);  
  Serial.print("Moisture = ");  
  Serial.println(moisture);  
  if(MOISTURE_LEVEL < moisture)  
  {  
   LedState(LOW);  
   digitalWrite(13,LOW);  
  }  
  else   
  {  
   LedState(HIGH);  
   digitalWrite(13,HIGH);  
  }  
  delay(500);  
 }  

Imprint

Publication Date: 04-26-2020

All Rights Reserved

Prev Page
Page /

Comments (0)

There are no comments yet. You can be the first!
Add a comment