door control
3
#include<regx51.h> void motor(int,int,unsigned int); unsigned int i; int x; void delay(unsigned int d) { for(i=0;i<d;i++); } void main() { while(1) { if(P1_0==1 && P1_1==0) { motor(1,0,50000); motor(1,1,60000); motor(0,1,50000); motor(1,1,60000); if(x<99)
-
Upload
siddharthrawat -
Category
Documents
-
view
214 -
download
0
description
synopsis
Transcript of door control
#includevoid motor(int,int,unsigned int); unsigned int i;int x;void delay(unsigned int d){for(i=0;i