Post topics, source code that relate to the Arduino Platform

User avatar
By shah
#39753
WereCatf wrote:
shah wrote:Thank you for your reply. But I don't see begin() taking GPIO pins in the function prototype. It only takes optional address of the device.
https://www.arduino.cc/en/Reference/WireBegin
Am I missing something?


The ESP uses its own Wire-library ( https://github.com/esp8266/Arduino/blob ... re-library ), which does accept those arguments.


Ah, great. I will try it out.
Thanks.
User avatar
By shah
#39799
WereCatf wrote:
shah wrote:Thank you for your reply. But I don't see begin() taking GPIO pins in the function prototype. It only takes optional address of the device.
https://www.arduino.cc/en/Reference/WireBegin
Am I missing something?


The ESP uses its own Wire-library ( https://github.com/esp8266/Arduino/blob ... re-library ), which does accept those arguments.


It worked! It worked! It worked! Thank you! Thank you!

I modified the LiquidCrystal_i2c library to use Wire.begin(0,2) and it worked!

I wonder if there is any #define macro for nodemcu or ESP that I could use to selectively call begin. Right now as it stands it is broke for Uno or Mega.