99问答网
所有问题
用C语言编写程序,要求实现两盏LED灯交替闪烁,间隔时间为2秒?
如题所述
举报该问题
其他回答
第1个回答 2022-07-12
bit LED1;
bit LED2;
LED1=1;
LED2=0;
while (1)
{ delay(2000);
LED1=!LED1;
LED2=!LED2;
}
相似回答
大家正在搜
相关问题
用C语言编写程序,要求实现两盏LED灯交替闪烁,间隔时间为2...
要求实现两盏LED灯交替闪烁,间隔时间为2秒 用51单片机实...
两个led指示灯交替闪烁的c语言
用定时器T0中断控制两组16个LED交替闪烁【要求周期2秒互...
请用C语言编程,实现单片机控制两个LED灯:当S1开关闭合时...
如何实现两个LED灯交替闪烁(要求:蓝灯连续闪两下停,接着红...
怎么用C语言编程51单片机实现两盏LED同时闪烁,端口不限
求用C语言编写一个简单的2个闪烁的灯,同时闪烁。