Advertisement
maheshs

automatic drip irrigation

Oct 8th, 2014
486
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.81 KB | None | 0 0
  1. //Made by mahesh.s
  2. //this project name is automatic drip irrigation
  3.  
  4. int pump =8;//connect to pin 8
  5. //connect the other terminal of the pum to the ground
  6. int led = 13;//inbuilt led or u can add ur led
  7.  
  8. void setup ()
  9. {
  10. pinMode(pump,OUTPUT);
  11. pinMode(led,OUTPUT);
  12. }
  13. void loop()
  14. {
  15. //............................... led .............................
  16. digitalWrite(led,HIGH);//you can change the acc to ur wish
  17. //just follow this methord :1min =60s;1milisec=1000;60*1000=60000;
  18. delay(300000);//high for 5 min
  19. digitalWrite(led,LOW);
  20. delay(1800000);//low for 5 hours
  21.  
  22. // .............................. pump..............................
  23. digitalWrite(pump,HIGH);
  24. delay(300000); //high for 5 min
  25. digitalWrite(pump,LOW);
  26. delay(1800000);//low for 5 hrs
  27.  
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement