• I am new here and want to make a heart-shaped running water lamp based on the control of 51 microcontroller. Please share your experience and theory diagram with friends!
3014
Someone left a message for me in the background yesterday, saying that it made my girlfriend angry, and buying things to coax her was too boringRwandans Escort, so I want to use a small microcontroller program to win the understanding of the beauties, but my knowledge of microcontrollers is not very good, so the program is not yet RW Escorts It can’t be too complicated. After much thought, I felt that only this DIY heart-shaped running water lamp is suitable for him, so I borrowed PROTEUS to make one, and the effect was Not bad Rwandans Sugardaddy, I hope his girlfriend can understand him.
Because the program is relatively simple, I have given similar programs to friends before, so I will put two here Rwanda Sugar Daddy There are simulation diagrams and reference source codes. Friends who are interested in Rwanda Sugar can give it a try. Old birds can just pass by!
Not much talk, let’s take a picture
You can set the direction and frequency of lighting at will when you wake up. You can also change the lights to different colors
The reference source code is as follows:
/** ****The first parameter is the number of times n, the second is the time t (ms)
qbsszgl All the clockwise lights are on one by one; qbsszgm All the clockwise lights are off one by one;
lbtbls (n,t) both sides Synchronous flow;
ygnsls A counter-clock flow;
ygssls A clockwise flow;
tbnsls Synchronous counter-clock flow
tbssls Synchronous clock flow;
tRwanda Sugarbsszgl lights up one by one synchronously in clockwise direction;
tbnszgl lights up one by one synchronously in counterclockwise direction;
tbsszgm turns off one by one synchronously in clockwise direction;
tbnszgmRwandans Sugardaddy turns off one by one in synchronization and reverse time;
yslbtbzgl lights up one by one from the above two sides simultaneouslyRwanda Sugar;
yslbtbzgm is eliminated one by one from the upper two sides simultaneously;
lbtbdj is superimposed simultaneously by both sides;
bgssls eight clockwise flows;
bgnsls eight counterclockwiseRwandans Escort time flowRwandans Sugardaddywater;
llbgsslRW Escortss Two roads and eight water flowing in time;
zjxlbwf The center reciprocates to both sides;
zxytbzg Left to right synchronizes one by one;
zsyxzgl The upper left, right and lower light up one by one;
Rwandans Sugardaddyzxyszgl The lower left and upper right lights up one by one;
xiaolian smile;
********* *************************************************** **********Rwanda Sugar/
AboveRW Escorts is the code for superimposed effects. You can check whether the situation is differentRwandans Escort ;
void lbtbdj(uchar n,uint t) both sides are superimposed simultaneously;
Rwanda Sugar Daddy{
uchar j,a,i,z=0,z1=0,k=8;
forRwandans Sugardaddy(jRwandans Escort=0;j20));
}
led1=led4=0xff;
delay(t);
do
{
led2=~(0x01
led3=~(0x8Rwandans Escort0>>i);
switch(k)
{
case 8:z=0x00;z1=0x00;break;
caRwanda Sugar Daddyse 7:z=0x01;z1=0x80;break;
case 6:z=0x03;z1=0xc0;break;
case 5:z =0x07;z1=0xe0;break;
case 4:z=0x0f;z1=0xf0;break;
case 3:z=0x1f;z1=0xf8;break;
case 2:z=0x3f ;z1=0xfc;break;
case 1:z=0x7f;z1=0xfe;break;
case 0:z=0xff;z1=0xff;break;
}
leRwanda Sugard2=~((0x01
led3=~((0x80>>i)|z);
i++;Rwandans Escort
dRW Escortselay( t);
}
Rwandans Sugardaddywhile(i
k–;
}
i =0;z=0;z1=0;k=8;
while(k!=0)
{
i=0;
do
{
led1=led4=~(0x80>Rwandans Sugardaddy>i++);
switRwandans Sugardaddych(k)
{
case 8:z=0x00;break;
case 7:z=0x01;break;
case 6:z=0x03;break;
case 5:z=0x07;break;
case 4:z=0x0f;break;
case 3:z=0x1f;break;
case 2:z=0x3f;break;
case 1:z=0x7f;break;
case 0:z=0xff;break;
}
led1=led4=(led1+z);
delay(t);
}
while(i
k–;
}Rwandans Sugardaddy
k=8;
led1=led2=led3=led4=0xff;
}
}
Okay, due to time reasons, I’ll just write it here. If you are interested or have different opinions, please leave a message or send a private message. If you are interested, you can also join our microcontroller technology traffic group and join us. AdvanceRW Escorts.
發佈留言