ESP32 NodeMCU Module – I2C

Pr-Request to Lean


ESP32 NodeMCU Module I2C Functions

  • i2c.address()  – Send (SW) or queue (HWx) I²C address and read/write mode for the next transfer.
  •  – Read (SW) or queue (HWx) data for variable number of bytes
  • i2c.setup()  – Initialize the I²C interface for master mode.
  • i2c.start()  – Send (SW) or queue (HWx) an I²C start condition.
  • i2c.stop()  – Send (SW) or queue (HWx) an I²C stop condition.
  • i2c.transfer()  – Starts a transfer for the specified hardware module.
  • i2c.write()  – Write (SW) or queue (HWx) data to I²C bus.
  • i2c.slave.on()  – Registers or unregisters an event callback handler.
  • i2c.slave.setup()  – Initialize the I²C interface for slave mode.
  • i2c.slave.send()  – Writes send data for the master into the transmit buffer.


ESP32 I2C Scanner Code

  • In this code used to can the i2c Devices
  • Used Software i2c and GPIO-23 as SDA and GPIO-22 as SCL of I2C Device
  • Connected DS3231 Device and check i2c address of DS3231




See Also


Next :

Previous :


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

if you have any queries call us +918300026060 or WhatsApp Dismiss


Your Cart

%d bloggers like this: