int onoff = 1; //点亮int count = 5000;while(true){ LED = onoff; //先点亮 count = 5000; while(count) ; //空跑CPU,为了占用时间,留出反转时间 onoff = !onoff; //LED反转}