For testing purposes I have a 22 pixel WS2812B strip connected to a OctoWS2811. Using the sample programs, i'm able to to easily get the rainbow program to work.
My goal is to ARTNet control the Teensy with Jinx, but the ethernet module comes in next week. I flashed a modified version of the ARTNet sample program that flashes the onboard LED based on serial traffic. When I start Jinx output I can see the LED flashing, and when I stop Jinx output it stops. However I'm not seeing any output/flicker to the strip. Is there some basic step that I'm missing?
My goal is to ARTNet control the Teensy with Jinx, but the ethernet module comes in next week. I flashed a modified version of the ARTNet sample program that flashes the onboard LED based on serial traffic. When I start Jinx output I can see the LED flashing, and when I stop Jinx output it stops. However I'm not seeing any output/flicker to the strip. Is there some basic step that I'm missing?
Code:
#include <OctoWS2811.h>
const int ledsPerStrip = 22;
const int NUM_LEDS = 22;
DMAMEM int displayMemory[ledsPerStrip*6];
int drawingMemory[ledsPerStrip*6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
void setup() {
leds.begin();
leds.show();
pinMode(13, OUTPUT);
digitalWrite(13, LOW);
}
int serialGlediator() {
while (!Serial.available()) {}
return Serial.read();
}
void loop() {
byte r,g,b;
int i;
while (serialGlediator() != 1) {}
digitalWrite(13, HIGH);
for (i=0; i < NUM_LEDS; i++) {
b = serialGlediator();
r = serialGlediator();
g = serialGlediator();
leds.setPixel(i, Color(r,g,b));
}
leds.show();
digitalWrite(13, LOW);
}
/* Helper functions */
// Create a 24 bit color value from R,G,B
unsigned int Color(byte r, byte g, byte b) {
return (((unsigned int)b << 16) | ((unsigned int)r << 8) | (unsigned int)g);
}