Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //Made by mahesh.s
- //this project name is automatic drip irrigation
- int pump =8;//connect to pin 8
- //connect the other terminal of the pum to the ground
- int led = 13;//inbuilt led or u can add ur led
- void setup ()
- {
- pinMode(pump,OUTPUT);
- pinMode(led,OUTPUT);
- }
- void loop()
- {
- //............................... led .............................
- digitalWrite(led,HIGH);//you can change the acc to ur wish
- //just follow this methord :1min =60s;1milisec=1000;60*1000=60000;
- delay(300000);//high for 5 min
- digitalWrite(led,LOW);
- delay(1800000);//low for 5 hours
- // .............................. pump..............................
- digitalWrite(pump,HIGH);
- delay(300000); //high for 5 min
- digitalWrite(pump,LOW);
- delay(1800000);//low for 5 hrs
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement