Answer the question
In order to leave comments, you need to log in
How to swap SDA and SCL?
Hello. Somehow I assembled a project based on Wemos D1 mini and (as it was possible) configured the connected buttons and display in the sketch. It so happened that after wrapping up, I soldered it and indicated in the config the display connection pins on the contrary (SDA-> SCL, SCL-> SDA). Everything worked until I wanted to use it for other purposes. The device is assembled in a sealed plastic case, which I don’t want to disassemble anymore, because the case is very small, and the soldering is very flimsy. When it came time to work with the Adafruit and Wire standard libraries, I realized that nothing came of it. How to swap pins in the Wire config? I can't even find this library because I have an application from the Windows store.
Answer the question
In order to leave comments, you need to log in
The answer in the first approximation: no, it is impossible. All standard libraries use hardware i2c, it hangs on certain pins that are not remapped.
A deeper answer: if you really want to, then you can. Look for the software i2c library. Communication will eat more CPU, but you can assign any pins.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question