You are reading a single comment by @Gordon and its replies. Click here to read the full conversation.
  • It doesn't do it right now, but the changes required are trivial. To cope with multiple drivers it seems that you just send the two different bits of data to the same address while keeping CS asserted.

    Arduino's library here: https://github.com/lstoll/arduino-librar­ies/blob/master/Matrix/Matrix.cpp#L129

    So it's probably as simple as changing:

    raw : function(val) {
          spi.send ([0x9,0],cs); // output raw data
          for (var i=0;i<val.length;i++) {
            spi.send([i+1,val[i]],cs);
          }
          spi.send([0x0C,1],cs); // no shutdown
        },
    

    to:

    raw : function(val) {
          digitalWrite(cs,0);
          spi.send ([0x9,0]); // output raw data
          for (var i=0;i<val.length;i++) {
            spi.send([(i&7)+1,val[i]]);
          }
          spi.send([0x0C,1]); // no shutdown
          digitalWrite(cs,1);
        },
    

    One nice extra is that you can actually use Espruino's built-in graphics library with it, so you can do something like...

    var g = Graphics.createArrayBuffer(3*8,8,1,{vert­ical_byte:true});
    g.drawString("Hello",0,0);
    max.raw(g.buffer);
    
About

Avatar for Gordon @Gordon started