Navigation

    obniz Developer's Community Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. 吉田研一
    吉
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    吉田研一

    @吉田研一

    0
    Reputation
    1
    Posts
    182
    Profile views
    0
    Followers
    0
    Following
    Joined Last Online

    吉田研一 Follow

    Best posts made by 吉田研一

    This user hasn't posted anything yet.

    Latest posts made by 吉田研一

    • AMG8833でI2Cアドレス0x68が指定できない

      スイッチサイエンスさんの「Conta™ サーモグラフィー AMG8833搭載 - スイッチサイエンス」を入手して、obniz Board 1Yにつないでいます。
      https://www.switch-science.com/catalog/3395/

      JSパーツライブラリの記事ではAdafruitのAMG8833ですので配線など接続を変え、I2Cアドレスを「Conta™ サーモグラフィー AMG8833搭載 - スイッチサイエンス」のデフォルト0x68に変更して以下の様にしました。

      var grideye = obniz.wired("AMG8833", { vcc:0, gnd:1, sda:3, scl:4,address:0x68});

      すると、以下のようなエラーメッセージがコンソールに出て動きません。

      Error: address must be 0x68 or 0x69
      Object
      message:"address must be 0x68 or 0x69"
      url:"https://unpkg.com/obniz@3.4.0/obniz.js"
      line:42130
      colmun:19
      

      以下の様にアドレスを0x69にすると上記エラーはでませんが、I2C接続エラーになります。

      var grideye = obniz.wired("AMG8833", { vcc:0, gnd:1, sda:3, scl:4,address:0x69});

      以下、0x69のときのエラー

      Uncaught Error: i2c0: writing error. Communication Timeout. Maybe, target is not connected.
      Object
      message:"Uncaught Error: i2c0: writing error. Communication Timeout. Maybe, target is not connected."
      url:"https://unpkg.com/obniz@3.4.0/obniz.js"
      line:2772
      colmun:17
      error:Error
      

      obnizのAMG8833のJSライブラリでI2Cアドレスを0x68に指定できるのでしょうか?

      ちなみに、Arduino IDEを使ったM5Stackでは、以下の記事を元に0x68に指定して正常に動作しました。
      M5Stackにサーマルカメラをつなぐ - AmbientでIoTをはじめよう http://pages.switch-science.com/letsiot/thermalcamera/

      /**
       * Conta™ サーモグラフィー AMG8833搭載 - スイッチサイエンス https://www.switch-science.com/catalog/3395/
       * M5Stackにサーマルカメラをつなぐ - AmbientでIoTをはじめよう http://pages.switch-science.com/letsiot/thermalcamera/
       **/
       
      #include <M5Stack.h>
      #include <Wire.h>
      
      #define PCTL 0x00
      #define RST 0x01
      #define FPSC 0x02
      #define INTC 0x03
      #define STAT 0x04
      #define SCLR 0x05
      #define AVE 0x07
      #define INTHL 0x08
      #define TTHL 0x0E
      #define INT0 0x10
      #define T01L 0x80
      
      //スイッチサイエンスのConta AMG8833のデフォルト0x68に。
      #define AMG88_ADDR 0x68 // in 7bit 
      
      #define WIDTH (320 / 8)
      #define HEIGHT (240 / 8)
      …以下略…
      

      bnizのAMG8833のJSライブラリでI2Cアドレスを0x68に指定できるようにしていただけるとありがたいです。
      よろしくお願いします。

      posted in Technical Support
      吉
      吉田研一