java - RFID ReaderTrack Loop -


hey guys i'll project call "rfid management system"

i found samlpe code websites , add few codes it.

my rfid can read number mifare card right now, face problem : how create loop rfid machine in order read card again , again without pushing "run" button in eclipse

import java.util.list; import javax.smartcardio.*; import javax.xml.bind.datatypeconverter;  public class blog {  public static void main(string[] args) {   try {    // display list of terminals    terminalfactory factory = terminalfactory.getdefault();    list<cardterminal> terminals = factory.terminals().list();    system.out.println("terminals: " + terminals);     // use first terminal    cardterminal terminal = terminals.get(0);     // connect wit hthe card     card card = terminal.connect("*");    system.out.println("card: " + card);    cardchannel channel = card.getbasicchannel();      // send select applet command    responseapdu answer = channel.transmit(new commandapdu(new byte[] { (byte)0xff, (byte)0xca, (byte)0x00, (byte)0x00, (byte)0x00 } ));     // send test command    answer = channel.transmit(new commandapdu(new byte[] { (byte)0xff, (byte)0xca, (byte)0x00, (byte)0x00, (byte)0x00 } ));    byte r[] = answer.getdata();    string hex = datatypeconverter.printhexbinary(answer.getbytes());    system.out.println("response: " + hex);     // disconnect card    card.disconnect(false);   } catch(exception e) {    system.out.println("ouch: " + e.tostring());   }  } } 

u might aware of arduino programming , right?, there have loop function(), whatever code write inside loops ever. logic these things (like rfid, finger print scanner, temp sensors, motion detectors etc) . use same technology here. put ur code inside

while(1){   }  

loop. iterate ur code ever. hence u desired o/p. u can flash ur card many times u want. make sure code reading , processing data should come inside loop. otherwise takes memory , may crash ur code.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -