You are reading a single comment by @SergeP and its replies. Click here to read the full conversation.
  • My 7 years old daughter have made (with my help) big digital clock. We use 8x32 matrix of ws8212b LED and small ESP8266 board with 5-to-3.3 V LDO on board. LED matrix have separate 2-wire power connector and 3-wire control connector, so we can connect 5V power adaptor to first one and ESP8266 to second one only (using 3 jumper wires - to GND, МСС and GPIO2).

    Then very simple program convert the matrix to digital clock

    var neopixel = require("neopixel");
    var g = Graphics.createArrayBuffer(8,32,24,{zigz­ag:true,color_order:'grb'});
    var att=6.9;
    var d=Math.pow(2,att);
    var oldTime, newTime;
    function drawTime() {
      if(oldTime != newTime) {
        neopixel.write(D2, g.buffer);
    neopixel.write(D2, g.buffer);

    Some comments:
    Last line are to fix state of LED matrix. It is enough to write first LED (even first logical LED - 1 byte) only but it is harder - we need separate (very small) buffer to do that. So we write all matrix. The line may be removed but first ouput will be incorrect.
    We have found that LED matrix is in fact 8x32 zigzag (first line is right-to-left, second one is left-to-right etc.) So we have added g.setRotation() to use it as 32x8 display.
    I have added att and d vars to control LED brightness more intuitively - now brightness looks to be changed linearly with att change.
    It need a few seconds to get correct time from Internet, so time displayed is strange after power on.


Avatar for SergeP @SergeP started