Navigation

    obniz

    forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. kemichi
    3. Posts
    K
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Posts made by kemichi

    • Node-RedからマトリクスLEDで描画したいです

      お世話になります
      マトリクスLEDを利用するサンプルコードをIBMクラウドのNode-Redから実行
      しようと試みましたが、以下のエラーがでてしまいました。
      "Error: obniz.js require node-canvas to draw rich contents. see more detail on docs"

      よくわからないながらに調べたのですが解決の糸口がわかりません。
      原因、解決方法をご教示ください

      コードはObnizHPのサンプルにあるもので、こちらです↓
      const matrix = obniz.wired("Keyestudio_HT16K33", { vcc:11, gnd:10, sda:9, scl:8 });
      matrix.brightness(7);

      const ctx = obniz.util.createCanvasContext(matrix.width, matrix.height);

      ctx.fillStyle = "black";
      ctx.fillRect(0, 0, matrix.width, matrix.height);
      ctx.fillStyle = "white";
      ctx.font = "9px sans-serif";
      ctx.fillText('Hello World', 0, 7);

      matrix.draw(ctx);

      posted in Beginner Questions/Discussion
      K
      kemichi