内容简介:下次循环时将以相反的顺序点亮*/ LEDDirection = !LEDDirection;LEDIndex = (LEDIndex+1)%8; /*LEDIndex+1对8取余,保证LEDIndex在0~7之间*/ Delay1ms(500); /*延时500ms,即LED的点亮间隔为0.5s*/ } } while(1){ P1=0xfe; //点亮第一个LED for(i=200...
用户评论
havenhome