#include #include#include#include#include
const int RS = 31, EN = 33, D4 = 35, D5 = 37, D6 = 39, D7 = 41;const int RFID_SS = 26, RFID_RST = 28;const int SD_CS = 24, SD_VCC = 22;const int MAXA = 255, BIT = 4, DOOR = 25, ADMIN = 23, BG = 29, OPEN_INDOOR = 27;
MFRC522 rfid(RFID_SS, RFID_RST);
MFRC522::MIFARE_Key key;
LiquidCrystal lcd(RS, EN, D4, D5, D6, D7);bytenuidPICC[BIT], record[MAXA][BIT];int num, new_time = 0;
unsignedlong long skey = 0;void lcdInit() //LCD屏幕初始化
{int xyz = millis() / 1000;
xyz/= 5;if(fmod(xyz, 2) == 0)
{
lcd.setCursor(0, 0);
lcd.print("Welcome To");
lcd.setCursor(0, 1);
lcd.print("Star Grazers Lab");
}if(fmod(xyz, 2) == 1)
{
lcd.setCursor(0, 0);
lcd.print("Ple