• 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

ESPnow two way communication : SCL and SDA pins

Q&A Forum › Category: ESP32 › ESPnow two way communication : SCL and SDA pins
0 Vote Up Vote Down
Michal Smialowski asked 3 years ago

I am working on getting ESPnow working with two Heltec ESP32 boards.
The boards that I have , have built in OLED displays. The SCL and SDA pins are different
than than for the stand alone OLED’s,
My question is , how do I change the IO pin numbers in the code? I can’t find any variables that reference them.
Thanks
Mike

6 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
Take a look at this tutorial: https://randomnerdtutorials.com/esp32-i2c-communication-arduino-ide/
Check this specific section:

  • Use Different I2C Pins with ESP32 (change default I2C pins)

I hope this helps.
Regards,
Sara

0 Vote Up Vote Down
Michal Smialowski answered 3 years ago

Thanks Sara that should be a big help.
Thanks for the quick reply too.
Mike

0 Vote Up Vote Down
Michal Smialowski answered 3 years ago

I looked at the code for espNow_sender and espNow_receiver.
Neither of these have an “include” for wire.h
The two includes are esp_now.h and wifi.h
Where should I look now for changing the pin assignment?
tnx
Mike

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

Hi.
Simply, include the wire.h library in your code:

#include <Wire.h>

Then, you can use the functions shown in the tutorial to use different I2C pins.
Regards,
Sara

0 Vote Up Vote Down
Michal Smialowski answered 3 years ago

tnx , I wouldn’t have thought of that.
Mike

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

Then let me know if you made it work.
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

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

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

Copyright © 2013-2025 · 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.