So I wrote a script in Processing that can output the HEX values of every pixel of any given image into an array. Im trying to get this FastLED library to read the Array and Im getting so many different errors. I tried changing the HEX's to strings I used FF and 0x headers. Nothing seems to works. Right now it keeps saying the Hex values aren't declared in the scope. If I change the hexes to strings I get a function error that tells me that they aren't stings. Im at wits end. Here's the code.
#include <FastLED.h>
#include <LEDMatrix.h>
#include <string.h>
// Change the next 6 defines to match your matrix type and size
#define LED_PIN 7
#define COLOR_ORDER GRB
#define CHIPSET WS2811
#define MATRIX_WIDTH 32 // Set this negative if physical led 0 is opposite to where you want logical 0
#define MATRIX_HEIGHT 8 // Set this negative if physical led 0 is opposite to where you want logical 0
#define MATRIX_TYPE VERTICAL_ZIGZAG_MATRIX // See top of LEDMatrix.h for matrix wiring types
cLEDMatrix<MATRIX_WIDTH, MATRIX_HEIGHT, MATRIX_TYPE> leds;
char pixs [] = {{FFCE2131},
{FFCE1929},
{FFCE1929},
{FFCE1929},
{FFCE1929},
{FFCE1929},
{FFCE1929},
{FFCE2131},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFCE1929},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFCE1929},
{FFCE1929},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFCE1929},
{FFCE1929},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFCE1929},
{FFCE1929},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFC50821},
{FFCE1929},
{FFCE1929}};
void setup()
{
FastLED.addLeds<CHIPSET, LED_PIN, COLOR_ORDER>(leds[0], leds.Size());
FastLED.setBrightness(15);
FastLED.clear(true);
delay(500);
FastLED.clear(true);
Serial.begin(9600);
}
void loop() {
leds(0,0) = 0xCE2131;
leds(31,0) = CRGB::White;
leds(0,7) = CRGB::Green;
leds(31,7) = CRGB::Yellow;
FastLED.show();
delay(2000);
FastLED.clear(true);
delay(1000);
int i;
for ( i = 0; i < length.pixs ; i ++){
leds(0,0) = pixs[i];
FastLED.show();
}
}