2
SOFTWARE DESCRIPTION #include<reg51.h> sbit SW_1 = P2^6; //connecting switch 1 to the port 2 ,pin 6. sbit SW_2 = P2^7; // connecting switch 1 to the port 2 ,pin 7. sbit MTR = P1^0; void main() { int x; while(1) { if(SW_1==0 & SW_2==0) { MTR=1; for(x=0;x<150;x++); MTR=0; for(x=0;x<600;x++); } if(SW_1==0 & SW_2==1) { MTR=1; for(x=0;x<300;x++); MTR=0; for(x=0;x<300;x++); } if(SW_1==1 & SW_2==0)

Source Code for Automatic plant irrigation Arduino

  • Upload
    akash

  • View
    9

  • Download
    3

Embed Size (px)

DESCRIPTION

Trust comes here...

Citation preview

SOFTWARE DESCRIPTION

#include sbit SW_1 = P2^6; //connecting switch 1 to the port 2 ,pin 6. sbit SW_2 = P2^7; // connecting switch 1 to the port 2 ,pin 7. sbit MTR = P1^0; void main() { int x; while(1) { if(SW_1==0 & SW_2==0) { MTR=1; for(x=0;x