2859| 2
|
单片机如何判断开机到关机状态 |
1金钱
最佳答案我昨天问的,今天上午已经写好程序了,感谢前辈
void Juge_IO(void)
{
//nowPinState = Flag_Interupt;
if (( Flag_Interupt == 1 ) && ( nowPinState == 0 ))//检测到开机状态,蓝光闪烁2S
{
//IO_Red = 1;
Flag_Blue_Flash = 1;
}
if(( Flag_Interupt == 0 ) && ( nowPinState == 1 ))//检测到关机状态,红灯闪烁2S
{
//IO_Blue = 1;
Flag_Red_Flash = 1;
}
nowPinState = Flag_Interupt; ...
| ||
| ||
| ||
专治疑难杂症
|
||
|手机版|OpenEdv-开源电子网
( 粤ICP备12000418号-1 )
GMT+8, 2025-6-9 00:58
Powered by OpenEdv-开源电子网
© 2001-2030 OpenEdv-开源电子网