Closed ethereal14 closed 2 years ago
Hi @ethereal14 ! This repository is not the right place to ask such generic questions. Next time please ask for help here https://community.platformio.org. In a nutshell, although I'm not sure what framework/library you're using, but based on your code snippet, you can try to redefine the I2C pins globally using the build_flags option.
Thanks for your reply!@valeros , you gave me a good idea!🙏
I want to use i2c on esp8266. First I copy the
i2c_master.h
andi2c_master.c
into my project. I want useGPIO12
andGPIO14
as i2c_sda and i2c_scl . Then I change it is macro definitionoriginal
now
But when I compile this project and upload firmware to esp8266, it is i2c pin still original pin.
I know it is usesing
i2c_master.h
from the SDK,but I don't known how to solve this problem