tisdag 6 oktober 2015

Playing with RFID modules in lab

[DELAYED POST]

We started to work with the RFID-reader. This wasn't a dance on red roses of course. At first we used some sample code found on X. That worked OK which made us very happy. The next step was to write to the RFID-tag. To find a sample code for this was way harder. After some searching we found some sample code that had worked for some other people on Internet. The reader detected the tag but only had possible to read some of the blocks, the rest we got ERROR. This error was also given when trying to write to the tag. We tried to troubleshoot but didn't find a solution. We discussed with Mattias what might could be wrong. Conclusion was that maybe these tags wasn't writable, even through it would be strange. In the sample code there was multiple examples of writing and all got the same problem. 

Then suddenly we hold the tag against the reader a little longer. Now the reader could access all the blocks. Suddenly we understood! The problem was that the code did so much things a part from just reading that it needed more time. Also when writing to the tag we needed to hold the tag against the reader during the whole process. This was the solution for us. 


A decision that was made during the lab was that we will setup the tags using only the UID of the tag. For example the UID 511 = triangle. This was decided to avoid reading from different blocks which we saw took some time and might cause problem in future.

An issue that we are heading to in future is how to use several RFID-readers in parallel, or rather how should we get three RFID-readers to detect chips with only one Arudino? We have a limited amount of pins and each RFID-reader uses approx. 6 input/outputs. Hopefully some of the inputs/outputs can be reused.

It will be exiting to see how we will manage to work with it. Stay tuned!


Inga kommentarer:

Skicka en kommentar