Good Day
thank you guys for an awesome board, and lots of support i have been reading.
I have a Teensy 3.6, and wish to hookup the RFID Reader to SPI (0), the default one
I am following the instructions from here, its very basic. http://www.instructables.com/id/Interfacing-RFID-RC522-With-Arduino-MEGA-a-Simple-/
but i just cant seem to make it work, nothing comes up on the Serial interface.
code below, and i am reassigning the SPI.SETSCK pin from 13 to 14.
any idea, i have tired with other libs also no luck:
thank you
thank you guys for an awesome board, and lots of support i have been reading.
I have a Teensy 3.6, and wish to hookup the RFID Reader to SPI (0), the default one
I am following the instructions from here, its very basic. http://www.instructables.com/id/Interfacing-RFID-RC522-With-Arduino-MEGA-a-Simple-/
but i just cant seem to make it work, nothing comes up on the Serial interface.
code below, and i am reassigning the SPI.SETSCK pin from 13 to 14.
any idea, i have tired with other libs also no luck:
thank you
Code:
#include <Arduino.h>
#include <SPI.h>
#include <RFID.h>
#define SDA_DIO 9
#define RESET_DIO 8
/* Create an instance of the RFID library */
RFID RC522(SDA_DIO, RESET_DIO);
void setup()
{
SPI.setSCK(14);
Serial.begin(9600);
/* Enable the SPI interface */
SPI.begin();
/* Initialise the RFID reader */
RC522.init();
// put your setup code here, to run once:
}
void loop()
{/* Has a card been detected? */
if (RC522.isCard())
{ Serial.println("here");
/* If so then get its serial number */
RC522.readCardSerial();
Serial.println("Card detected:");
for(int i=0;i<5;i++)
{
Serial.print(RC522.serNum[i],DEC);
//Serial.print(RC522.serNum[i],HEX); //to print card detail in Hexa Decimal format
}
Serial.println();
Serial.println();
}
delay(1000);
// put your main code here, to run repeatedly:
}
Last edited by a moderator: