• Here it is... regarding orientation: tilt your head to the right to see it landscape... sorry for that... since the shot was straight down, the phone (camera) could not figure out top...

    To take (most of) the glare away, I put a white card stock / heavy white paper on the leds.

    Btw, orange and red are the 'working colors 0 and 3.

    What you can observe is: with multiple colors, color sequence in the string is always the same: zag - odd row - sequence is reverse of zig - even row - sequence, and the middle pixels have the same color and the begin and end pixels have each a different color.

    This is a dump of the colors and the buffer - line by line - you can recognize the diagonal line: Tilde ~ means dark pixel with color 0, uppercase character X means that R or G or B have a value other than 0. The dump looks for all color the same! There is no graphics.clear() between the drawing of the diagonal with the different color... so no bio-color-perception dependent aliasing - ;-) - or in other words: same algorithm and ultimately integer values for which pixel to paint and which not: always the same 2 pixels except 3 on third row (row 2).

     0:   1573095
     1:   7667850
     2:  15144960
     3:     51510
        0
         12345678
     0: XX~~~~~~~
     1: ~~XX~~~~~
     2: ~~~~XXX~~
     3: ~~~~~~~XX
    

    Buffer dump w/ more details (byte index of RGB tuple begin for even row and end for odd row - and RGB values):

          tuple
          index
             in    
    row  buffer   R   G   B
    ------- --- ----------- -----
    evn zig   0  54 201   0 true 
    evn zig   3  54 201   0 true 
    evn zig   6   0   0   0 false
    evn zig   9   0   0   0 false
    evn zig  12   0   0   0 false
    evn zig  15   0   0   0 false
    evn zig  18   0   0   0 false
    evn zig  21   0   0   0 false
    evn zig  24   0   0   0 false
      0: XX~~~~~~~
    odd zag  53   0   0   0 false
    odd zag  50   0   0   0 false
    odd zag  47   0 201  54 true 
    odd zag  44   0 201  54 true 
    odd zag  41   0   0   0 false
    odd zag  38   0   0   0 false
    odd zag  35   0   0   0 false
    odd zag  32   0   0   0 false
    odd zag  29   0   0   0 false
     1: ~~XX~~~~~
    evn zig  54   0   0   0 false
    evn zig  57   0   0   0 false
    evn zig  60   0   0   0 false
    evn zig  63   0   0   0 false
    evn zig  66  54 201   0 true 
    evn zig  69  54 201   0 true 
    evn zig  72  54 201   0 true 
    evn zig  75   0   0   0 false
    evn zig  78   0   0   0 false
     2: ~~~~XXX~~
    odd zag 105   0   0   0 false
    odd zag 102   0   0   0 false
    odd zag  99   0   0   0 false
    odd zag  96   0   0   0 false
    odd zag  93   0   0   0 false
    odd zag  90   0   0   0 false
    odd zag  87   0   0   0 false
    odd zag  84   0 201  54 true 
    odd zag  81   0 201  54 true 
     3: ~~~~~~~XX
    

    Same pattern for all the R G B colors:

    #     R   G   B   colorNo
    -   --- --- ---  --------      
    0   231   0  24   1573095 
    1   138   0 117   7667850
    2     0  24 231  15144960
    3    54 201   0     51510
    

    Even if I messed up the interpretation of RGB or BGR or what ever, I would expect to show only one color... or max two - one for zig and one for zag... but not three with the inner pixels - if there are more than one as in row 2 - having the same color...

    To produce this, setup the neopixel string on B15 w/ a resistor of 330R Ohm between B15 and 5V and upload this code:

    // colorfun.js
    var npxPin = B15
      , g = Graphics.createArrayBuffer( 9,4,24
                ,{zigzag:true,color_order: "rgb"} ) 
      , clrs = [1573095,7667850,15144960,51510]
      , cdx  = 0
      , cIId = setInterval(function(){ 
            g.setColor(clrs[cdx]); g.drawLine(0,0,8,3);
            cdx = ++cdx % 4;
          },1000)
      , sIID = setInterval(function(){
            require("neopixel").write(npxPin,g.buffe­r);
          }, 500)
      ; pinMode(B15,"af_opendrain");
    

    I also tried w/ no no zig-zag and the color effect is the same... also drawing single lines in horizontal and vertical and +-45 degrees show the same color issue... set pixel does it!


    2 Attachments

About

Avatar for allObjects @allObjects started