module CJMCU - 219 INA219 I2C

Posted on
  • There is a module: http://www.ti.com/lit/ds/symlink/ina219.­pdf
    CJMCU - 219 INA219 I2C interface Bi-directional current/power monitoring sensor module.
    Please tell me, how can I connect it?
    Is there a JS for it?

  • I don't believe there is a library for that but it's unlikely to be too hard for you to make one - it's usually just a matter of doing what the datasheet says.

    If you post up here with any questions we can try and help you out.

  • A Google search produces at least one path for a driver in C.
    A bit of translation would produce the code that you need. ( a week to a month estimate)
    https://github.com/adafruit/Adafruit_INA­219

    This link is a good discussion of the chip
    http://cdwilson.us/articles/understandin­g-the-INA219/

    A NODEjs version of the code
    https://github.com/brettmarl/node-ina219­
    and another
    https://libraries.io/npm/ina219

    Have fun sorting it all out.

  • Attached is a start on the translation of the Adafruit C code.
    Since I don't have the chip it is untested.
    It should give you an idea of what is involved.


    1 Attachment

  • Hello! I'm doing an I2C project for ESP826612F 1V91
    Should the function work: find?
    function dthread(){
    var i2c = new I2C();
    i2c.setup({scl:D4, sda:D2});
    var p=i2c.find(D2);
    console.log(p);}


    1 Attachment

    • Буфер обмена02.jpg
  • Result


    1 Attachment

    • Буфер обмена01.jpg
  • Nope - I2c.find isn't a built-in method. The reference lists what's available here: http://www.espruino.com/Reference#I2C

    If you have other questions related to ESP8266 please can you post them on the ESP8266 forum though? This post originally doesn't have much to do with your question at all, apart from having I2C in the title.

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

module CJMCU - 219 INA219 I2C

Posted by Avatar for Mark @Mark

Actions