SparkFun Forums 

Where electronics enthusiasts find answers.

Have questions about a SparkFun product or board? This is the place to be.
By shailja.anjana
#191298
Hello All ,
I am creating a pop up book which will show the story of ramayana through projection mapping . To control the projection on each page we are using rfid tags. We have place a rfid reader on the board which is at the back of the book and each book page has rfid readers attached to it.
Is it possible that one rfid reader reads all the tags ?
to explain it a little more , our book is attached to a iron board which has magnets on it . each book page has a magnet on it so when someone opens the first page it gets attached to the board and the rfid tag at the back of the first page get in contact with the rfid reader and projects the first page graphics, then we open the second page and it gets attached to the another magnet on the board and the rfid tag gets in contact with the reader and displays the second page graphics .

is it possible to do this , making a reader read different tags
By MonsterBot
#191303
Yes. Every RFID card has a unique ID. As long as you use a unique card for each page, you can write your program decipher between each tag.
By shailja.anjana
#191305
import processing.serial.*; //This library is needed to read Serial data(normally bluetooth or in this case USB)
String tempCard="";
Serial port; // The serial port
String card =""; // this is the variable that we will be assigning the string to
import processing.video.*;
//import codeanticode.syphon.*;

//SyphonServer server;
//PGraphics canvas;
Movie movie[];
int index = 0;
void setup() {
fullScreen();
//size(1920,1080,P3D);
// canvas = createGraphics(1920,1080, P3D);

movie = new Movie[3];

movie[0] = new Movie(this, "screenFromSnapzPro.mov");
movie[0].loop();
movie[0].pause();

movie[1] = new Movie(this, "Storm.mp4");
movie[1].loop();
movie[1].pause();

movie[2] = new Movie(this, "kitty.mp4");
movie[2].loop();
movie[2].pause();

// server = new SyphonServer(this, "Processing Syphon");

printArray(Serial.list()); //This prints a list of all the active serial ports, please use this to change the value below

port = new Serial(this, Serial.list()[2], 9600); //THE VALUE IN THE BRACKETS MUST BE
//CHANGED TO PORT THAT THE READER IS ATTACHED TO
}

void draw() {
checkForRFID(); //This just calls the method below to check and read RFID



// canvas.beginDraw();
// canvas.image(movie[index], 0, 0, width, height);
//canvas.endDraw();
// image(canvas, 0, 0);
image(movie[index], 0, 0, width, height);
/// server.sendImage(canvas);

if (tempCard.equals("")){
background(255);
}
}


//This code reads the RFID cards
void checkForRFID() {
//empty string that we can use for compaing other values against

while (port.available() > 0) {
String inBuffer = port.readString(); //Read string reads the RFID value all at once and makes it a string a lot easy to parse than byte by byte IMHO
if (inBuffer != null) { //this is the part that will print a value if there is an RFID card is touching it
//println(inBuffer);

card = card+inBuffer; //this assigns the string coming from the RFID to the variable card for analyzing
if(card.length()==16){
println(card);
tempCard=card.substring(9,13);
println("TempCard: "+tempCard);
playMovie();
card="";
}

//println("ID: "+tempCard);


}

}
}






void movieEvent(Movie m) {
m.read();
}





void playMovie(){




if (tempCard.equals("D282")) {
movie[0].jump(0);
movie[0].play();
index = 0;

movie[1].pause();
movie[2].pause();
}
else if (tempCard.equals("6936")){
movie[1].jump(0);
movie[1].play();
index = 1;

movie[0].pause();
movie[2].pause();
}
else if (tempCard.equals("C83D")){
movie[2].jump(0);
movie[2].play();
index = 2;

movie[0].pause();
movie[1].pause();
}

}
By shailja.anjana
#191306
This is our code for the RFID reader and tags but its not working, the rfid reader is not reading the other tag untill and unless we remove the first one
By shailja.anjana
#191311
There are a few limitations I wanted to point out quickly. Sadly, the ID-2 / 12 /20 , as with most readers, can only read one tag at a time. In fact, having 2 or more tags in the readers range will cause it to not read any tags at all. So, if you need to detect the presence of many tags, you will need to figure out another way, get a different sensor, or buy a bunch of these. But… more than one reader right next to each other can cause none of them to work due to interference. You can wrap the bottom and sides with foil to help cancel the interference (be careful not to short the reader with the foil). Lastly, the range, even on the ID-20 is less than 4in real world. That means you can’t easily use these for detection


this is what i read. the thing is that we are not trying to use rfid tags one over another , we are actually using small laundry tags with id-20. we are placing the tags next to each other but untill we remove the first one the rfid reader doesnt read the second one .