I'm trying to get different RFID cards to open different web pages and have almost got the coding down, apart from the fact that whenever I scan a card, web page upon web page opens, to the point where Processing has to be Force Quit to stop it.
I'm using an ID-12 RFID scanner with an arduino.
Here is my coding - I've tried noLoop(); but it just stops the script doing anything at all...
import processing.serial.*; import cc.arduino.*;
Serial myPort; String tagID=""; int i;
void setup(){ size (600, 200);
println(Serial.list()); String portnum=Serial.list()[1]; myPort= new Serial(this, portnum, 9600); myPort.buffer(16);
}
void draw(){ background(0); println (tagID);
if (tagID.equals("1F001A8850")) { for (int i = 1; i < 2; i = i+1) link("http://mj3989.tumblr.com"); }
else { if (tagID.equals("1F001A82CF") ) for (int i = 1; i < 2; i = i+1) link ("http://melaniejnewbould.tumblr.com"); } }