rfid.init() crashes my program

#include <LiquidCrystal_I2C.h>
#include <Wire.h>
#include <Keypad.h>
#include <EEPROM.h>
#include <SPI.h>
#include <MFRC522.h>

/* Define the DIO used for the SDA (SS) and RST (reset) pins. */
#define SS_PIN 9
#define RST_PIN 8

MFRC522 rfid(SS_PIN, RST_PIN);
LiquidCrystal_I2C lcd(0x27, 20, 4);

void setup(){
    Wire.begin();
    Serial.begin(9600);
    for (int i = 0; i > 3; i++) {
        parameters[i] = 0;
    }
    lcd.backlight();
    lcd.init();
    lcd.clear();
    for (int i = 0; i < 4; i++)
    {
        lcd.setCursor(0, i);
        lcd.print("1 2 3 4 5 6 7 8 9 10");
    }
    delay(2000);
    rfid.PCD_Init();
    SPI.begin();
    lcd.clear();
    Projectstartup();

in the code above when the code reaches rfid.PCD_Init(): it crashes on the arduino with no error message on the pc any help?
using the MFRC522 1.4.8 rfid library

Show your entire code

above is the only relevant code, cant get past the line rfid.PCD_Init();

It's not relevant enough, the only problem I can see in this part of code is this loop which will never execute

for (int i = 0; i > 3; i++) {
    parameters[i] = 0;
}

If you fix this problem and the crash is still happening then you will have to show the full code.. Or at least a small but complete, compilable code just enough to demonstrate the problem.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.