Led流星雨
来源:学生作业帮助网 编辑:作业帮 时间:2024/09/02 03:38:55
![Led流星雨](/uploads/image/z/14657692-4-2.jpg?t=Led%E6%B5%81%E6%98%9F%E9%9B%A8)
xmOKAO~.;˺B$k."tnfPhx
}][4άyg~2:Mܛ|&rUq~2fxrqS+ujx5r*j#u˦SBX];ԁ±e59kXXZ©]<ċn3珬@ |)(`TjYM 0ȠXEMmŃ(#h}Nd릭s|kEUq
tFa *-S-kyt~f5캷!;
q4b ( `*2
Yd 0K$R>]d(a$l.YabJ5J ^r~! ^
Led流星雨
Led流星雨
Led流星雨
#include
typedef unsigned char uint8;
sbit ENLED = P1^4;
sbit ADDR3 = P1^3;
sbit ADDR2 = P1^2;
sbit ADDR1 = P1^1;
sbit ADDR0 = P1^0;
sbit DB0 = P0^0;
void main()
{
unsigned char i,k,p,t,j;
char l;
unsigned char a[]={0,1,2,4,6,16,32,64}; //亮度数组以实现拖尾效果
unsigned char b[]={0,34,48,59,68,76,84,91,97,103,109,114,119,123,126}; //时间数组以实现加速效果
signed char c[]={-7,-6,-5,-4,-3,-2,-1,0,1,2,3,4,5,6,7};
ENLED=0;ADDR3=1;
ADDR0=0;ADDR1=1;ADDR2=1;
P0=0xFF;
while(1)
{
k=0;
for(i=0;i