I want to scan the address of my I2C devices and it's not happening.
Here is my super basic code that I was able to run successfully with an UNO R4 but no luck with Nano ESP32.
Try removing one set of pull up resistors. Also verify those modules do not already have them installed. Put these two lines of code in your program and see what you get.
Serial.print(SCL);
Serial.print(SDA);
Then check to see if that is the pins you used. This works on the Arduino's I use.
Hi @wanmax
the fact that you do not get any feedback to your problem seems to be the way how you post it.
Looks like few people see what your problem is, at least I don´t. Can you explain what you want to do with the I2C line ?
can you please post your code properly in this forum. In the IDE you can mark all you want to publish and choose "copy to forum" instead of just "copy"
actually, if you just want to check if the connections via I2C to your devices are working you can run the simple example WireScan from the library. If this does not find any connected devices then you have a HW-problem.
Update: I tried running I2Cdetect by Mike Causer and I'm still not able to detect the address of my DS1307 using the Nano ESP but no problem with UNO R4. I can confidently say that it's not a connection problem. I'm using the same connections, components, wires, USB cable and still, only the UNO works - it prints out the correct address "0x50", in my case. I also tried different NANO ESP boards and they giving the same response - all "--".
The Uno is a 5V device and the Nano ESP32 is a 3.3V device, so you must have them connected differently.
Are you powering the modules with 3.3V or 5V?
They must be powered by 3.3V when using the Nano ESP.
If the modules require 5V, then you MUST use voltage translators when connected to the ESP
Make sure there are only one set of pull-up on the I2C bus.