|
楼主 |
发表于 2021-1-27 23:44
|
显示全部楼层
- void diandeng()
- {
- unsigned char NFC_OK=0;
- unsigned char h=0;
-
- for( h=0;h<6;h++)
- {
- if(NumBer==NfcNum[h])
- {
- NFC_OK=1;
- break;
- }
- else
- {
- NFC_OK=0;
- }
- }
- if(NFC_OK==1)
- {
- digitalWrite(led, !digitalRead(led));
- Serial.println("刷卡正确;开门");
- {
- Di(1);
- }
- digitalWrite(GPIO, LOW);
- delay(2000);
- Serial.println("关门");
- digitalWrite(led, !digitalRead(led));
- digitalWrite(GPIO, HIGH);
- }
- else
- {
- Serial.println("卡不对,请重试");
- Serial.println("请在灯闪灭后重试");
- for(char i=0;i<3;i++)
- {
- Di(2);
- }
- }
- }
复制代码
|
|