problem with reading serial led data

i have a matrix of WS2812 led strips 30x24, trying to send it data from jinx! via the glediator protocol to a Due but I cant quite figure out whats going wrong, or really whats goin on with the code. ive tried every example code i could find for glediator or jinx but this is the best ive gotten so far (see video). i dont think its a power issue because im running it off a 5v 75 amp power supply. it shouldnt be a ground issue so im thinking its something in the code. any ideas?
video

#include <FastLED.h>
#define LED_TYPE WS2812
#define DATA_PIN 8
#define NUM_LEDS 720
#define COLOR_ORDER GRB
#define BRIGHTNESS  100
CRGB leds[NUM_LEDS];

#define BAUD_RATE 1000000
#define CMD_NEW_DATA 1

void setup() {
  Serial.begin(BAUD_RATE);
  FastLED.addLeds<LED_TYPE, DATA_PIN, COLOR_ORDER>(leds, NUM_LEDS);
  FastLED.setBrightness(BRIGHTNESS);
}

int serialGlediator () {
  while ( !Serial.available() ) {}
  return Serial.read();
}

void loop() {
while (serialGlediator () != CMD_NEW_DATA) {}
  Serial.readBytes((char*)leds, NUM_LEDS * 3);
  FastLED.show();
}

I am not familiar with the library but this

CRGB leds[NUM_LEDS];

would seem to indicate that the leds array has NUM_LEDS levels in it.

This, however

 Serial.readBytes((char*)leds, NUM_LEDS * 3);

would seem to say that 3 * NUM_LEDS should be read into it

Please accept my apologies if my observations are wrong.

UKHeliBob:
would seem to say that 3 * NUM_LEDS should be read into it

Each CRGB item might contain 3 bytes - one for each colour.

...R

Robin2:
Each CRGB item might contain 3 bytes - one for each colour.

...R

you are correct. im just really confused by what the leds are doing when they are supposed to be displaying all red (in the video), i cant figure out why thats the outcome i get. do i need to create an array or something to use as a buffer for the serial data?

I'm not familiar with your LED stuff. is the program in your Original Post something that you wrote, or is it code that you got from somewhere?

If it is code that you got somewhere have you made ANY changes to it?

...R

the only changes ive made were to the few #defines at the top. Ive tried all the sample/example glediator code i could find and this was the only one i could really get much of anything with. i think its because this way of going about reading the data loads the whole matrix worth of info into the array then displays it. the other examples used a for loop and replaced
Serial.readBytes((char*)leds, NUM_LEDS * 3);
with
for (int i=0; i < NUM_LEDS; i++) {
leds*.r = serialGlediator();*
_ leds*.g = serialGlediator();_
_ leds.b = serialGlediator();*
but otherwise were the same_

InsanePoetry666:
the only changes ive made were to the few #defines at the top.

It is entirely possible to break the program by doing that :slight_smile:

Post the original program and also post the program with your changes.

Does the original program work properly?

...R

i don't know if it works or not, the things i changed were meant to be changed, like #define NUM_LEDS #define DATA_PIN so im pretty sure thats not the problem but i know that it definitely wouldn't work as it was downloaded