Justinli
Member level 4
Code:
#include <SoftwareSerial.h>
#include <Servo.h
#include <SPI.h
#include <MFRC522.h
#include <IRremote.h> (included)
#define SS_PIN 10 // customize the two PIN ports of the RC522
#define RST_PIN 9
#define RECV_PIN 5 // IR receive pins
#define CARDS 4 //number of cards
#define SERVO_PIN 6 // Servo port
#define BUZZ_PIN 8 //buzzer pin
long int IR_ID = 0xFFABCD; //define IR variable
string ESP01S_Data = "".
decode_results result.
const byte User_ID[CARDS][4] = { {0xDD, 0xAA, 0xBB, 0x11}, // campus card
{0xAD, 0x99, 0xDD, 0xEE},
}; //Save multiple card uid values
MFRC522 rfid(SS_PIN, RST_PIN); //new RC522 object
Servo myservo;
SoftwareSerial EspSerial(3, 2); // RX, TX
IRrecv irrecv(RECV_PIN);