• ...had some more neopixely color fun with this code... works like a charm... I mean @Gordon 's neopixel implementation... the old way... and in a bit - comes 2v02 - also the new way!

    Take a look at the clip showing poor man's video screen... display panel... call it what you want... (this version uses the 30 pixel per m... 60/m is available too and would make it better (and more power hungry. Going for 144/m will almost be 'blowing away'... also the power that goes with it. 144/m is the densest so far. Theoretically 200 is possible by the body of the pixel (<=5mm square), but unfortunately the 'legs' stick a bit out and are thus not that cooperative to reach that density.

    // colorfun4.js
    
    // drawing Lines and Text and setting a Pixel in 7 x 20
    
    var npxPin = B15
      , g = Graphics.createArrayBuffer( 20,7,24
                ,{zigzag:true,color_order: "rgb"} ) 
      , clrs = [1573095,7667850,15144960,51510]
      , cdx  = 0, pdx = 0, dte
      , cIId = setInterval(function(){
            g.clear();
            g.setColor(clrs[cdx]);
            if (pdx < 4) {
              g.drawLine( 0, 0, 5, 5);
              g.drawLine(11, 0,19, 0);
              g.drawLine(19, 0,19, 5);
              g.setPixel(9,3,clrs[cdx]);
            } else if (pdx < 5) {
              g.drawString("Hi -",0,0);
            } else if (pdx < 6) {
              g.drawString("Mike!",0,0);
            } else if (pdx < 8) {
              d = new Date();
              g.drawString(""+(d.getMonth()+1)+"/"+d.g­etDate(),0,0);
              if (pdx === 6) cdx = (cdx+3) % 4;
            } else if (pdx < 10) {
              g.drawString((""+d.getHours()).substr(-2­)+":"+(""+d.getMinutes()).substr(-2),0,0­);
              if (pdx === 8) cdx = (cdx+3) % 4;
            } else if (pdx < 11) {
              g.drawString("ooPs",0,0);
            } 
            cdx = ++cdx % 4; pdx = ++pdx % 11;
          },1000)
      , sIID = setInterval(function(){
            SPI2.send4bit(g.buffer, 0b0001, 0b0011); 
          }, 500)
      ; require("Font6x8").add(Graphics);
        g.setFont6x8();
        pinMode(npxPin,"af_opendrain");
        SPI2.setup({baud:3200000, mosi:npxPin});
    

    2 Attachments

About

Avatar for allObjects @allObjects started