Wozzy
Well-known member
I am getting weird results running OCTOWS2811 on the Teensy3.1
If I install a Teensy3.0 in the breadboard, and compile it for Teensy3.0 works great, slow smooth color transitions.
If I swap it for a Teensy3.1, and recompile it for Teensy3.1, I get flickering and jittering random colors.
The breadboard is wired just like in the example with 100 ohm resistor and jumper on pins 15-16.
I get the same results with the example rainbow sketch.
I have another Teensy3.1, so I'll solder up some pins and give that a try.
Is anyone else seeing similar issues.
Teensy 3.1
Teensy 3.0
If I install a Teensy3.0 in the breadboard, and compile it for Teensy3.0 works great, slow smooth color transitions.
If I swap it for a Teensy3.1, and recompile it for Teensy3.1, I get flickering and jittering random colors.
The breadboard is wired just like in the example with 100 ohm resistor and jumper on pins 15-16.
I get the same results with the example rainbow sketch.
I have another Teensy3.1, so I'll solder up some pins and give that a try.
Is anyone else seeing similar issues.
Code:
/* OctoWS2811 Rainbow.ino - Rainbow Shifting Test
http://www.pjrc.com/teensy/td_libs_OctoWS2811.html
Copyright (c) 2013 Paul Stoffregen, PJRC.COM, LLC
*/
#include <OctoWS2811.h>
const int ledsPerStrip = 33;
DMAMEM int displayMemory[ledsPerStrip*6];
int drawingMemory[ledsPerStrip*6];
const int config = WS2811_GRB | WS2811_800kHz;
OctoWS2811 leds(ledsPerStrip, displayMemory, drawingMemory, config);
int rainbowColors[2160];
void setup() {
for (int i=0; i<2160; i++) {
int hue = i / 6;
int saturation = 100;
int lightness = 50;
// pre-compute the 180 rainbow colors
rainbowColors[i] = makeColor(hue, saturation, lightness);
}
leds.begin();
}
void loop() {
rainbow(0, 5000);
}
void rainbow(int phaseShift, int cycleTime)
{
int color, x, y, offset, wait;
wait = cycleTime * 1000 / ledsPerStrip;
for (color=0; color < 2160; color++) {
for (x=0; x < ledsPerStrip; x++) {
for (y=0; y < 8; y++) {
int index = (color + x + y*phaseShift/2) % 2160; // 2160 elsewhere & 180 here is cool
leds.setPixel(x + y*ledsPerStrip, rainbowColors[index]);
}
}
leds.show();
delayMicroseconds(wait);
}
}
Teensy 3.1
Teensy 3.0