how to read only UID of the rfid tag using RC522 RFID reader


can 1 tell me have done mistake..??

there no syntax error logic error there..

my code

#include<spi.h>
#include<mfrc522.h>
#define rst_pin 9
#define ss_pin 10

mfrc522 mfrc522(ss_pin, rst_pin);
unsigned long uid[3];
unsigned long uid1;




void setup() {
  serial.begin(9600);
  //while(!serial);
  spi.begin();
 
}

void loop() {
if(!mfrc522.picc_isnewcardpresent())
{
  return;
}
if(!mfrc522.picc_readcardserial())
{
  return ;
}

}

for (int = 0; < 3; i++) { 
    uid = mfrc522.uid.uidbyte;
    uid1 = uid;
}
serial.println("hi uid is  ");
serial.print(uid1,hex);

quote
can 1 tell me have done mistake..??
mistake number 1.  no [­code] ... [­/code] tags around code
mistake number 2.  not posting whole program
mistake number 3.  not describing problem.

please you.


Arduino Forum > Using Arduino > Programming Questions > how to read only UID of the rfid tag using RC522 RFID reader


arduino

Comments

Popular posts from this blog

sd card Could not find FAT16/FAT32 partition [solved]

Sketch upload fails with Java error (___REMOVE___/bin/avrdude)!

Programming ATtiny816 using Arduino IDE