Completely forgot to post the code! sorry!
Processing:
Code:
void setup(){
String portName = "/dev/tty.usbmodem8061";
myPort = new Serial(this, portName, 57600);
}
void draw(){
if (bassAvg > 100) myPort.write(1);
else myPort.write(0);
}
Arduino IDE:
Code:
void loop() {
if (Serial.available()) { // If data is available to read,
val = Serial.read(); // read it and store it in val
}
if (val == 1) { // If hit was received
colorWipe(PINK); // turn the LED on
} else {
colorWipe(0); // Otherwise turn it OFF
}
//delay(100);
}