I added int count = sensors.getDeviceCount();
and Serial.print(count);
to the Arduino code.
it shows: 2 2 2 2 2 2 2 so its seeing both sensors on the bus?
I also modified the Test Sketch to see what the serial port was receiving in Processing.
import processing.serial.*;
Serial myPort; // Create object from Serial class
int val;
void setup() {
size(200, 200);
myPort = new Serial(this, "COM4", 115200);
}
void draw(){
if ( myPort.available() > 0) { // If data is available,
val = myPort.read(); // read it and store it in val
}
background(255);
if (val == 0) { // If the serial value is 0,
fill(0); // set fill to black
}
else {
print(val);
}
println();
}
}
and now im getting values in the serial monitor.