• Like to use this post to build up a list of tested i2c devices on ESP8266

    please fell free to add devices - thanks.

  • Monochrome 128x32 I2C OLED graphic display, adafruit PRODUCT ID: 931

    o comes with integrated 4.7k pull-ups

    o module SSD1306

    o ESP8266-12E&F

    o D4 - SDA and D5 - SCL

    works without problems

  • It might be useful to document which board and pins were used as well, as this seems to be the tricky part!

  • @Wilberforce added board and pins - thanks for that hint

  • Adafruit HTU21D-F Temperature & Humidity Sensor Breakout Board
    PRODUCT ID: 1899

    working on esp8266-01
    sda - D0 scl - D2 or
    sda - D2 scl -D0
    works without problems.

    By mistake, I run esp8266-01 with 5 volts for a week before I discovered that it only should have 3V3 volts.

    I have made clock streching on it with a copy from @TVE.

  • AT24 series eeprom

    4.7k pullups, on pins 4 and 5.

    Esp-12f I think.

  • Might be useful documenting what's not working too, just a thought, and, crucially, which MCU you are using!

  • @Frida - wow, can you please share the clock stretching code ?

  • Working for me:

    • MCP23008 port expander
    • Honeywell SSC MAN 060PG 2A3 pressure sensor
    • Bosch BME180
      All using I2C1.setup({scl:D12,sda:D13}); and a 4.7K resistor to 3.3v.

    • comes with integrated 4.7k pullups

    • using snippets from module 'MLX90614'

    • FM Radio module RDA5807M
    • On an ESP8266-12F
    • Using I2C1.setup({sda: D4, scl: D5});
    • NOT working :(

    Works fine in Mongoose IoT (formerly smart.js)

    Will try to build the mentioned clock stretching code soon to see if that can make it work.

  • If your I2C device is not working the most helpful would be to hook up a logic state analyzer. That'll tell you what is going on...

  • would be to hook up a logic state analyzer

    Even just sticking LEDs on the 2 pins (so they are normally off) would let you check whether you had the right ones.

  • It might be useful to document which board and pins were used as well, as this seems to be the tricky part!>
    In addition, a code snippet might help people too!

  • ESP8266 - PCF8574 8 bit IO expander from DX.com

    I2C1.setup({scl:NodeMCU.D5, sda:NodeMCU.D4});
    var lcd = require("HD44780").connectI2C(I2C1);
    lcd.print("Hello World!");

    I'm not sure if the pull up lines even have an effect, as it works without them too!

    1 Attachment

    • IMG_0190.JPG
  • TI INA3221: "INA3221 Triple-Channel, High-Side Measurement, Shunt and Bus Voltage Monitor"
    a.- (Dev Kit by SwitchDoc Labs : http://store.switchdoc.com/ina3221-break­out-board-3-channel-current-voltage-moni­tor-grove-headers-compare-to-ina219-grov­e-headers/ )

    b.- I2C works with: I2C1.setup({sda:D4,scl:D5});

    c.- Physical Pinouts are SCL/D1 and SDA/D2 (3 places on the board)

    d.- PullUps @ 4k1 Ohms

    E.- Work In Progress

    1 Attachment

    • INA3221.JPG
  • Nice small monochrome I2C 0.96 and 1.3 OLED - the 0.96 is my favorite one.

    o each comes with integrated 4.7k pullups

    o used module SSD1306

    o on ESP8266-12E&F

    o D4 - SDA and D5 - SCL

    works without problems

  • TLS2561 - LIGHT-TO-DIGITAL CONVERTER from Adafruit

    • integrated 4.7k pullups

    • used module TSL2561

    • on ESP8266-04,12E/F

    • D4 - SDA and D5 - SCL

    works without problems


    • integrated 4.7k pullups

    • used module PN532

    • on ESP8266-04,12E/F

    • D4 - SDA and D5 - SCL

    works only with clock stretching by @Frida, have to run some more test and then will create a PR

      "chip": "PN532",
      "firmware": "1.6",
      "support": 7 }
  • BH1750 Light Sensor

    • not sure about pullups so I tried it without any
    • BH1750FVI from ebay
    • on ESP 12F
    • D4 - SDA and D5 - SCL

    var bh=require("BH1750").connect(I2C1);

    no probs

  • clock stretching by @Frida will be available with 1v92

  • Working for me:

    Bosch BMP280
    I2C1.setup({sda: D4, scl: D5} ); with SD0 to low address 118; to high address 119

    1 Attachment

    • bmp280.JPG
  • DS1307 and AT24C32 on TinyRTC

    • integrated 3.73 pullups
    • used module DS3231 - work perfect with DS1307
    • tested on ESP8266-04,12E/F 1v95

    var SDA = D5, SCL = D4; // ESP8266
    I2C1.setup({scl:SCL,sda:SDA, bitrate:100000});
    var rtc = require("DS3231").connect(I2C1, { DST : true });
    rtc.setTime(Date().getHours(),Date().get­Minutes(), Date().getSeconds());
    setInterval(function() {
    }, 1000);
    /* output
    23/00/18 22:06:20
    23/00/18 22:06:30
    23/00/18 22:06:40

    1 Attachment

    • SKU099560L.jpg
  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview

please name the i2c devices you have tested or using

Posted by Avatar for MaBe @MaBe