import environmentxml.*; DataIn dSL; DataIn dRL; PFont font; float t; void setup(){ size(900,700); font = loadFont("XERXES-SIX-6.vlw"); textFont(font, 6); // change the feed number at the end of the line dSL = new DataIn(this, "http://transition.turbulence.org/Works/remote/docs/xmlproxy.php?url=http://haque.co.uk/environmentxml/live/xml/126.xml", 5000); dRL = new DataIn(this, "http://transition.turbulence.org/Works/remote/docs/xmlproxy.php?url=http://haque.co.uk/environmentxml/live/xml/122.xml", 5000); } void draw(){ } int rowHeight= 18; void onReturnEnvironmentXML(DataIn d){ int increment = 0; if (d == dSL) increment = 1; fill(0); rect(increment * 450,0, 450, 700); for (int i = 0; i < d.getNumberOfStreams(); i ++) { try{ t = d.getIdValue(i); fill(255,255,255); text(d.getTag(i) + ": " + d.getIdValue(i), 10 + increment * 450, 18 + i * rowHeight); fill(50,100,100); rect (10 + increment * 450, 20 + i * rowHeight, t / 4, 5); } catch (Exception e){ // ignore data streams with string values } println(t); } }