OctoWS2811 Unexpected Colors (7 bits per channel )

Status
Not open for further replies.

jazzzb

New member
Hello,

Noticing a bit of issue with colors not being displayed correctly. Searches are coming up empty, and curious if anyone as any background on this. I've been able to reproduce from multiple machines, however lack to the toolchain to dig any deeper.

:: Problem ::
The top bit of each color channel appears to be masked off under later Arduino environments. (255 = 127) (128 = 0).

Below is my observations of running the Code snippet attached.Obviously the difference between Lime green and Very green is subjective however the important note is that the perceived green channel drops to zero as the value turns to 128.

[Arduino IDE 1.8.0 - teensyduino 1.35]
expected results are shown

A = 'Very Green'
B = 'Lime Green'
C = ''Lime Green'
D = 'Red'

[Arduino IDE 1.8.1 - teensyduino 1.35 ([and TD1.36)]

A = 'Lime Green'
B = 'Lime Green'
C = ''Red'
D = 'Red'

In the code example below (A,B) are equal and (C,D) are equal. this holds for R,G,B channels


:: Environment ::
Hardware: Teensy 3.2
Ledstrip: WS2812 5050 (sourced from adafruit)
Wiring: Stock teensy 3.2
Compiling Device: Windows 8.1

::Example::
Code:
#include <OctoWS2811.h>

const int ledsPerStrip = 6;

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();
}

void loop() {  
  fill(leds.color(60,254,0)); // A
  delay(2000);
  fill(leds.color(60,127,0)); // B
  delay(2000);
  fill(leds.color(60,128,0)); // C
  delay(2000);
  fill(leds.color(60,0,0)); // D
  delay(2000);

}

void fill(int color){
  for (int i=0; i < leds.numPixels(); i++) {
    leds.setPixel(i, color);
  }
  leds.show();
}

Has anyone else been seeing this? I can roll back my environment for now, however would like to gain some more info on this so I can address it eventually.

Cheers,
Jazz

Note: Might be a distraction but this is also the boundary that The 'first pixel' issue (https://forum.pjrc.com/threads/43001-octo-basic-test-first-pixel) first appears for me.
 
I just loaded arduino 1.8.2 with teensyduino 1.36 and can confirm what your seeing (if thats what your asking).
Thanks for the heads up.

On my test 100 led strip first led appears white if I change ledsPerStrip to 100, but is not white if I use ledsPerStrip=6.
Either way I get:
A = 'Lime Green'
B = 'Lime Green'
C = ''Red'
D = 'Red'
 
Looks like I might have added a bug in the recent version of OctoWS2811. :(

I've put this on my high priority bug list.

Can you give the old 1.2 version a try? Does it work on your LEDs?

https://github.com/PaulStoffregen/OctoWS2811/releases

Using teensyduino 1.35.
arduino 1.6.9
Using library OctoWS2811 at version 1.3 (One Point Three) in folder: C:\Program Files (x86)\Arduino\hardware\teensy\avr\libraries\OctoWS2811

I get

A = 'Very Green'
B = 'Lime Green'
C = ''Lime Green'
D = 'Red'
:)

(on another computer)
Using teensyduino 1.36.
arduino 1.8.2
Using library arduino_980941 at version 1.2 in folder: C:\Users\gibbe\Qsync\Arduino\libraries\arduino_980941 (dunno why arduino does this)

My 100 leds stay bright white. Not sure whats going on there. 1.3 at least gave me something.edit: (perhaps something else went wrong here when I was testing)
:(
 
Last edited:
Status
Not open for further replies.
Back
Top