CodePudding user response:
Shed light on how a button control three relay? According to the control one at a time relay?CodePudding user response:
The simulation diagram should have no problemCodePudding user response:
Press 1 for the first time relay, the second 2 relay, 3 relay to open the third time, fourth time fully open, can be achieved with this pictureCodePudding user response:
Open your so-called refers to relay and off? The IO port output low level?Can be sure,
CodePudding user response:
The main function to judge
While (1) {
If (k==0)
{
Unsigned int a=22222; While (a -);
if(! K)
{
If (p0==255) p0=223;
If (p0==223) p0=191;
If (p0==191) p0=127;
If (p0==127) p0=255;
}
while(! K);
}}