For those who are interested in a working work around for this dmx controller here is what I’ve got so far
#include <Conceptinetics.h>
#include <FastLED.h>
#define ROWS 4
#define COLS 8
#define NUM_LEDS ROWSCOLS
#define DMX_MASTER_CHANNELS NUM_LEDS3
#define RXEN_PIN 2
#define DATA_PIN 11
#define CLOCK_PIN 13
CRGB leds[NUM_LEDS];
DMX_Master dmx_master ( DMX_MASTER_CHANNELS, RXEN_PIN );
uint8_t hue = 183;
uint8_t sat = 128;
uint8_t val = 255;
uint8_t fadeouttime = 100;
uint8_t varHorizontal = 100;
uint8_t varVertical = 100;
boolean vertical = true;
const bool serpentinelayout = false;
void setup() {
delay(2000);
dmx_master.enable();
FastLED.addLeds<P9813, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}
void loop() {
hue++;
knightrider();
FastLED.show();
senddmx();
delay (20);
}
void senddmx(){
for(int i=0; i < NUM_LEDS; i++) {
setLight(i, leds[i].r, leds[i].g, leds[i].b);
}
}
void setLight(uint8_t led, uint8_t red, uint8_t green, uint8_t blue){
dmx_master.setChannelValue (led3+1, blue );
dmx_master.setChannelValue (led3+2, red );
dmx_master.setChannelValue (led*3+3, green );
}
uint16_t XY(uint8_t x, uint8_t y){
uint16_t i;
if( serpentinelayout == false) {
i = (y * COLS) + x;
}
if( serpentinelayout == true) {
if( y & 0x01) {
uint8_t reverseX = (COLS - 1) - x;
i = (y * COLS) + reverseX;
}
else {
i = (y * COLS) + x;
}
}
return i;
}
void knightrider(){
int x = beatsin16(varHorizontal,0,COLS);
for( byte y = 0; y < ROWS; y++) {
leds[ XY(x, y)] = CHSV( hue, sat, val);
}
fadeToBlackBy( leds, NUM_LEDS, fadeouttime);
}