• I was trying out the i2cdetect script by @MaBe by using: I2C1.setup({sda: SDA, scl: SCL}) and I was wondering why none of my I2C devices were being detected when I used the very same Pixl.js to develop the INA219 module.

    Then I copied the example code I used for that module which had this setup: I2C1.setup({ sda: A4, scl: A5 });

    I thought the SCL and SDA constants were pointing to the wrong pins, and it looks like they are:

    |  __|___ ___ ___ _ _|_|___ ___
    |  __|_ -| . |  _| | | |   | . |
    |____|___|  _|_| |___|_|_|_|___|
             |_| espruino.com
     2v06 (c) 2019 G.Williams
    >process.env
    ={
      VERSION: "2v06",
      GIT_COMMIT: "21168a2b",
      BOARD: "PIXLJS",
      FLASH: 524288, STORAGE: 36864, RAM: 65536,
      SERIAL: "e29d7f50-21853912",
      CONSOLE: "Bluetooth",
      MODULES: "Flash,Storage,hea" ... "el,graphical_menu",
      EXPTR: 536882640 }
    >SDA
    =D4
    >SCL
    =D5
    

    D4 and D5 on the Pixl.js are digital pins.

  • Hi - thanks for letting me know! Just fixed it - it'll be in the cutting edge builds, or 2v07 when released.

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

Pixl.js SDA and SCL seems to be pointing to the wrong pins

Posted by Avatar for parasquid @parasquid

Actions