stm32led如何正负反接?
stm32led如何正负反接?
int onoff = 1; //点亮nint count = 5000;nnwhile(true)n{n LED = onoff; //先点亮n count = 5000;nn while(count) ; //空跑CPU,为了占用时间,留出反转时间n onoff = !onoff; //LED反转nn}
来源:文章来源于网络,如有侵权请联系我们删除。本文由五金加工编辑,欢迎分享本文,转载请保留出处和链接!
stm32led如何正负反接?
int onoff = 1; //点亮nint count = 5000;nnwhile(true)n{n LED = onoff; //先点亮n count = 5000;nn while(count) ; //空跑CPU,为了占用时间,留出反转时间n onoff = !onoff; //LED反转nn}