Page 55 - 완) I MDP 프로젝트 작품 보고서(전체과 1학년)1.6
P. 55
.nbr = NBR_106,
};
if (nfc_initiator_select_passive_target(pnd, nmMifare, NULL, 0, &nt) > 0) {
print_hex(nt.nti.nai.abtUid, nt.nti.nai.szUidLen);
if (nt.nti.nai.szAtsLen) {
printf(" User ID: ");
print_hex(nt.nti.nai.abtAts, nt.nti.nai.szAtsLen);
}
}delay(1000);
}
int main(int argc, const char *argv[])
{
if(wiringPiSetup()==-1) return 1;
pinMode (NFC_ON,INPUT);
pinMode (NFC_RIGHT,OUTPUT);
pinMode (NFC_WRONG,OUTPUT);
while(1)
{
digitalWrite(NFC_RIGHT,0);
digitalWrite(NFC_WRONG,0);
if(digitalRead(NFC_ON))
{
nfcStart(argc,argv);
}
}
}
- 48 -