• 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

BME280

Q&A Forum › Category: ESP32 › BME280
0 Vote Up Vote Down
nan_cogtest asked 4 years ago

Are there other pins that can used instead of
21 and 22? as this used for many other devices
Can i program the following on ESP32?
I2C_SDA – MTDO – GPIO15
I2C_SCL – GPIO2
I2C_SDA – GPIO0
I2C_SCL – GPIO4

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

Hi.

You can define other I2C pins other than 21 and 22.

However, I wouldn’t recommend the pins you are referring. Those are strapping pins, which means that depending on your code, if you use them for I2C, you may get unexpected results when the ESP32 boots or resets.

But you can always try and see if you get weird behavior.

You can assign any two pins as SDA/SCL using Wire.begin(SDA,SCL)

Regards,

Sara

0 Vote Up Vote Down
nan_cogtest answered 4 years ago

ok will have a try what are the best 2 pins? other than 21 and 22 ?

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Hi.
GPIO 33 and 32 are good options.
You can also check this link: https://espeasy.readthedocs.io/en/latest/Reference/GPIO.html
And scroll down to the ESP32 table to check the best pins to use.
I hope it helps.

0 Vote Up Vote Down
nan_cogtest answered 4 years ago

Hi Nope 33 and 32 dont work tried diff addresess
what works are 04 05 at 0X76

0 Vote Up Vote Down
Sara Santos Staff answered 4 years ago

Ok.
I’m glad it is working.
Thank you for letting me know.
Regards,
Sara

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.