I am using both an RFID and a fingerprint sensor in my project. When running the program, the RFID is detected but the fingerprint sensor is not detected and hence my code is not going forward.

Here is my code

#include <Adafruit_Fingerprint.h>
#include <SoftwareSerial.h>
#include <MFRC522.h>
#include <SPI.h>

#define SAD 10
#define RST 5

MFRC522 nfc(SAD, RST);

uint8_t id;
uint8_t getFingerprintEnroll();
int getFingerprintIDez();

// pin #2 is IN from sensor (GREEN wire)
// pin #3 is OUT from arduino (WHITE wire)
SoftwareSerial mySerial(2, 3);
Adafruit_Fingerprint finger = Adafruit_Fingerprint(&mySerial);

void setup() {
  Serial.println("Looking for MFRC522.");
  byte version = nfc.getFirmwareVersion();
  if (! version) {
    Serial.print("Didn't find MFRC522 board.");
    while (1); //halt

  Serial.print("Found chip MFRC522 ");
  Serial.print("Firmware ver. 0x");
  Serial.print(version, HEX);

  Serial.println("Fingerprint and RFID Test");

  if (finger.verifyPassword()) {
    Serial.println("Found fingerprint sensor!");
  } else {
    Serial.println("Did not find fingerprint sensor :(");
    while (1);

char abc;

void loop() {
  abc = Serial.read();
  switch (abc) {
    case '1': {
      // enroll method
    break ;
    case '2': {
      // verify method
    case '3': {
      // rfid method
  • What does happen?
    – Mark Smith
    Commented Apr 30, 2017 at 20:01
  • serial monitor is not showing anything. when I run the rfid and fingerprint code individual they both are working correctly but when join them not working
    – Ravi
    Commented Apr 30, 2017 at 20:06
  • Literally nothing? Not even Fingerprint and RFID Test in your setup()?
    – Mark Smith
    Commented Apr 30, 2017 at 20:24
  • fingerprint and rfid test is working if I write rfid.init() after this code. if I write before fingerprint and rfid test then it shows nothing
    – Ravi
    Commented Apr 30, 2017 at 20:40
  • 2
    Could you replace your code with a minimal, complete, verifiable example, please? You could also edit your question to remove irrelevant information - such as the stuff about the switch statement. Help us to help you.
    – Mark Smith
    Commented Apr 30, 2017 at 21:09

1 Answer 1


Get rid of the Serial.begin(9600). You're accidentally changing the Serial baud rate without doing the same in the serial monitor so you'll probably see gibberish, if anything.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.