• Hello Markus,

    I do not have a pinned pico, i've used a pico board and pin header on breadboard without soldering anything (crap work!!!)

    In an earlier version i was ligthting On dot by dot on the first line and it was working.
    but it seems to light on the led but i'm not sure the out is a line...
    with this one i'm a bit confuse how a graphic buffer and uint8Array work together!
    if i drawString("H") in my arrayBuffer, it should look like this

    10001  //17 -> #11
    10001  //17 -> #11
    10001  //17 -> #11
    11111  //31 -> #'1F'
    10001  //17 -> #11
    10001  //17 -> #11
    10001  //17 -> #11
    

    but the value from the graphicBuffer are not...
    if i add

    for (let i=0; i<a.length;i++) {
        console.log(a[i].toString(2));
      }
    

    my "brilliant" test :/

    let g = Graphics.createArrayBuffer(5,7,1);
    let a = new Uint8Array(g.buffer);
    
    var compteur=0;
    var row= [A6,A5,A8,B7,B6]; // my 5 col
    
    function sendData() {
      g.clear();
      g.drawString("H");
      digitalWrite(B4,0); // select first row
      for (let i=0; i<row.length;i++) {
        digitalWrite(row[i],a[i]);
      }
      digitalWrite(B4,1); // leave First row
      compteur++;
    }
    
    function onInit() {
      require("Font4x6").add(Graphics);
      pinMode(B4,"opendrain");
      for (let i=0; i<row.length;i++) {
        pinMode(row[i],"output");
      }
      digitalWrite(B4,1);
      setInterval(sendData, 1000);
    }
    

    é.


    1 Attachment

    • 2018-12-18 00.09.12-2.jpg
About

Avatar for Mrbbp @Mrbbp started