PaulStoffregen
Well-known member
But now i get a major lag in the Processing screen and also the strip lighting up. i will post some code but can someone tell me why this is happening?
Not without seeing the code...
But now i get a major lag in the Processing screen and also the strip lighting up. i will post some code but can someone tell me why this is happening?
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);
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);
}