sorry for the repost but I'm really upset now.

sorry for the repost but I’m really upset now. :frowning:
I’m not a hardcore coder but I learned a lot since I started to work whit FastLED and Processing but I can’t solve one problem…
The problem is when I want to control my leds my framerate start at 9fps and slowly go down to 1… any idea? here my noob code :frowning:

import processing.serial.;
import controlP5.;

ControlP5 MyController;
int red = 0;
int green= 0;
int blue = 0;
int HEIGHT = 15;
int WIDTH = 20;
int NUM_LEDS = WIDTH * HEIGHT ;
int[] leds = new int[NUM_LEDS];

Serial port;

void setup(){

size(500,500);

port = new Serial(this,Serial.list()[0], 1000000);

MyController = new ControlP5(this);
MyController.addSlider(“red”,0,255,0,height/2,width/2,30,150);
MyController.addSlider(“green”,0,255,0,height/2+90,width/2,30,150);
MyController.addSlider(“blue”,0,255,0,height/2-90,width/2,30,150);

}
void draw() {

background(51);

println(frameRate);

port.write(1);

for (int i = 0; i <=leds.length ; i++){

 port.write(red);
 port.write(green);
 port.write(blue);

}

}

Have you tried a baud rate lower then 1000000 ?
What happens if you use 115200 ?

I already tried that. And I dont want to lower the baud rate because this is normal rate for the JINX and Glediator and I want to use the same arduino sketch. (If my English is bad sorry for that) :stuck_out_tongue:

Are you reading all the data for the full strip and /then/ doing stuff with it, or does it do something with the data for each pixel /as/ it comes in? If the latter, try reading all the data first.

Try packaging up the RGB data for each pixel and sending it together as one larger chunk instead of three.

Also, try commenting out println(frameRate), or only call it every few seconds so it’s not running continuously.
Also, if you have a bunch of print statements in your arduino code, try commenting them out once you’ve verified you’re receiving the correct data. print statements are slow and a lot of them can slow stuff down.