// IMPORTANT NOTE: // the first serial port retrieved by serial.list() //should be your arduino. if not, uncomment the next //line by deleting the // befor it and re-run the //sketch to see a list of serial ports. then, change //the 0 in between [ and ] to the number of the port //that your arduino is connected to. //println(serial.list()); String arduinoPort = Serial.list()[0]; port = new Serial(this,arduinoPort, 9600); // connect arduino

// this is a bit of virtual plumbing as we connect // the data coming from the connection to be buffered // reader that reads the data one line at a time. BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream())); // read each line from the feed while ((data = in.readLine()) != null) {

StringTokenizer st = new StringTokenizer(data,"\"<>,.()[] ");// break it down while (st.hasMoreTokens()) { // each chunk of data is made lowercase chunk= st.nextTocken().toLowerCase() ;

peace = peace * 4; // multiply by 4 so that the max is 255 love = love * 4; // which comes in handy when building a arduino = arduino * 4;// colour that is made of 4 bytes (argb) } catch (exception ex){ // if there was an error, stop the sketch ex.printStackTrace(); system.out.println("ERROR: "+ex.getMessage()); }

how do i get the processing program to work with arduino i up loaded the java program that it needed. but it still dose not see Android SDK Tools.i am working on network lamp project from getting started with arduino.

this is were i got the program for the processing part of this project. http://processing.org/download/. and this program keeps asking if this Android SDK is installed. witch it is now. hear is what the processing program is asking. is the android sdk installed ?the android sdk dose not appear to be installed,because the ANDROID_SDK variable is not set.if it is installed, click yes to slect the location of the sdk or no to visit the sdk download site at http://devloper.android.com/sdk.let me know what u think. thank you.

Are you trying to click the Standard/Android button in the top right of the Processing IDE? That seems to be what triggers the Android SDK requirement. You don't need to change that from Standard, unless you want to target Android devices.

i got most of the lamp to work but i am having problems with the button to turn the lamp on and off.the leds switch and the sensor is working.this project is from getting started with arduino hears the arduino code // Example 08B: Arduino Networked Lamp//// Copy and paste this example into an empty Arduino sketch

font = loadFont("HelveticaNeue-Bold-32.vlw"); fill(255); textFont(font, 32); // IMPORTANT NOTE: // The first serial port retrieved by Serial.list() // should be your Arduino. If not, uncomment the next // line by deleting the // before it, and re-run the // sketch to see a list of serial ports. Then, change // the 0 in between [ and ] to the number of the port // that your Arduino is connected to. println(Serial.list()); String arduinoPort = Serial.list()[1]; port = new Serial(this, arduinoPort, 9600); // connect to Arduino

// this is a bit of virtual plumbing as we connect // the data coming from the connection to a buffered // reader that reads the data one line at a time. BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));

// read each line from the feed while ((data = in.readLine()) != null) {

StringTokenizer st = new StringTokenizer(data,"\"<>,.()[] ");// break it down while (st.hasMoreTokens()) { // each chunk of data is made lowercase chunk= st.nextToken().toLowerCase() ;

font = loadFont("HelveticaNeue-Bold-32.vlw"); fill(255); textFont(font, 32); // IMPORTANT NOTE: // The first serial port retrieved by Serial.list() // should be your Arduino. If not, uncomment the next // line by deleting the // before it, and re-run the // sketch to see a list of serial ports. Then, change // the 0 in between [ and ] to the number of the port // that your Arduino is connected to. println(Serial.list()); String arduinoPort = Serial.list()[1]; port = new Serial(this, arduinoPort, 9600); // connect to Arduino

// this is a bit of virtual plumbing as we connect // the data coming from the connection to a buffered // reader that reads the data one line at a time. BufferedReader in = new BufferedReader(new InputStreamReader(conn.getInputStream()));

// read each line from the feed while ((data = in.readLine()) != null) {

StringTokenizer st = new StringTokenizer(data,"\"<>,.()[] ");// break it down while (st.hasMoreTokens()) { // each chunk of data is made lowercase chunk= st.nextToken().toLowerCase() ;