32LED单片机心形花样流水灯#include;#include;#defineuintunsignedint#defineucharunsignedcharucharcodezou[]={0x01,0x02,0x04,0x08,0x10,0x20,0x40,0x80};//单个从0到7ucharcodeyou[]={0x80,0x40,0x20,0x10,0x08,0x04,0x02,0x01};//单个从7到0ucharcodeliang0_7[]={0x01,0x03,0x07,0x0f,0x1f,0x3f,0x7f,0xff};//逐个点亮0~7ucharcodeliang7_0[]={0x80,0xc0,0xe0,0xf0,0xf8,0xfc,0xfe,0xff};//逐个点亮7~0ucharcodemie0_7[]={0xfe,0xfc,0xf8,0xf0,0xe0,0xc0,0x80,0x00};//逐个灭0~7ucharcodemie7_0[]={0x7f,0x3f,0x1f,0x0f,0x07,0x03,0x01,0x00};//逐个灭7~0/***********************************************************/voiddelay(uintt);//延时voidzg(uintt,uchara);//两边逐个亮voidqs(uintt,uchara);//全部闪烁voidzgxh(uintt,uchara);//逆时针逐个点亮//voidzgxh1(uintt,uchara);//顺时针逐个点亮voiddjs(uintt,uchara);//对角闪voidlbzgm(uintt,uchara);//两边逐个灭//voidsszgm(uintt,uchara);//顺时针逐个灭voidnszgm(uintt,uchara);//逆时针逐个灭voidsztl(uintt,uchara);//顺时逐个同步亮voidnztl(uintt,uchara);//逆时逐个同步亮voidsztm(uintt,uchara);//顺时逐个同步灭voidnztm(uintt,uchara);//逆时逐个同步灭voidhwzjl(uintt,uchara);//横往中间亮voidhwzjm(uintt,uchara);//横往中间灭//voidswzjl(uintt,uchara);//竖往中间亮//voidswzjm(uintt,uchara);//竖往中间灭voidnzdl(uintt,uchara);//逆时逐段亮voidnzdgl(uintt,uchara);//逆时逐段一个点亮voidjgs(uintt,uchara);//间隔闪/**********************************************************/voidzg(uintt,uchara)//两边逐个亮{uchari,j;for(j=0;j;0;x--){for(y=120;y;0;y--);}}