• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

What pins are the I2C pins on the ESP32?

Q&A Forum › Category: ESP8266 › What pins are the I2C pins on the ESP32?
0 Vote Up Vote Down
Kevin Hogan asked 5 years ago

Was looking to do a project with the ADXL345 via I2C to the ESP12E and ESP32.  Arduino board has two pins named SCL and SDA, but do not see that on the ESP boards.   Do these boards support I2C?

2 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 5 years ago

Hi Kevin.
The hardware I2C pins for the ESP32 are GPIO 22 (SCL) and GPIO 21 (SDA). The pins with a blue rectangle in the figure below. However, you can set almost any pin as I2C via software.

To learn more about I2C with the ESP32, read our guide: ESP32 I2C Communication: Set Pins, Multiple Bus Interfaces and Peripherals (Arduino IDE)

For the ESP 12E, the pins often used for I2C are GPIO 5 (SCL) and GPIO 4 (SDA).
Regards,
Sara

0 Vote Up Vote Down
Kevin Hogan answered 5 years ago

Thanks!! I somehow missed these when I looked at this diagram in your book, which is fantastic by the way.  Thanks for pointing this out.  The diagram of the ESP-12E (in an earlier book/tutorial) did not show GIO 5(SCL) but I had seen something else on the web that suggested that these pins (D1/D2) supported i2c.  Thanks for confirming!!!

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [eBook Updated] SMART HOME with RPi, ESP32, and ESP8266 (version 1.2) March 8, 2023
  • [eBook Updated] ESP32-CAM Projects (version 1.3) January 7, 2023

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2023 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.