Mixly-RFID智能门禁
测试卡号:
void setup(){
Serial.begin(9600);
SPI.begin();
rfid.init(); S
erial.begin(9600);
} void loop(){
if ( rfid.isCard()
) {
Serial.println(RFID_readcardnum());
}
}
下面给出截图
实验二:
void setup(){
Serial.begin(9600);
SPI.begin();
rfid.init();
RC = "";
Serial.begin(9600);
servo_6.attach(6);
}
void loop(){
if ( rfid.isCard() )
{
RC = RFID_readcardnum();
Serial.println(RC);
if (RC == card[(int)(0)])
{
servo_6.write(90);
delay(3000);
servo_6.write(0);
delay(0); }
}
下面是截图