• Thought about this... but the colors are so absurd... and how can you smoothen out setting single pixel? ... it is random that left or right of the pixel a green one shows... just weird.

    Here the code to your suggestion - and thank you for jumping on this:

    // colorfun2.js
    
    // drawing Lines and setting a Pixel in 9 x 4 and 24 bbp
    //
    //   0 1 2 3 4 5 6 7 8
    // 0 L ~ ~ ~ ~ L L L L
    // 1 ~ L ~ ~ P ~ ~ ~ L
    // 2 ~ ~ L ~ ~ ~ ~ ~ L
    // 3 ~ ~ ~ L ~ ~ ~ ~ L
    
    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,3,3);
            g.drawLine(5,0,8,0);
            g.drawLine(8,0,8,3);
            g.setPixel(4,1,clrs[cdx]);
            cdx = ++cdx % 4;
          },2000)
      , sIID = setInterval(function(){
            require("neopixel").write(npxPin,g.buffe­r);
          }, 250)
      ; pinMode(B15,"af_opendrain");
    

    2 Attachments

About

Avatar for allObjects @allObjects started