I have discovered that the pin-outs for SDA SCL appear to have some differences on these two boards.
Specifically, on the WiFi Rev2, I installed an Adafruit LCD 16x2 display with Adafruit I2C backpack on pins A4 (SDA) and A5 (SCL) and spent substantial time trying to get it to work but it never did. It works fine if that display and backpack are installed on an UNO on those same pins.
On the REV2 the combination does work if the alternate SDA and SCL pins are used (the ones near the AREF pin).
This may have something to do with the WiFi chip and inertial chip being on the board. I couldn't find a pinout diagram for the WiFo Rev2 and so far have not found any technical documentation referring to this difference.
I fully understand that these two boards are very different internally, but thought the pin-outs were the same.
If anyone knows of a pin-out diagram specific to the WiFi Rev2 or some other documentation that explains this difference, it would be appreciated.
In this image, the green and red highlights indicate the working (green) and non-working (red) SDA and SCL pins on the WiFi Rev2 with the above mentioned display combination.
PickyBiker:
This may have something to do with the WiFi chip and inertial chip being on the board.
No, that's not the reason.
PickyBiker:
I fully understand that these two boards are very different internally
Correct. The thing is that by not having I2C on A4 and A5 you are gaining another two IO pins on the Uno WiFi Rev2. That was not possible on the original Uno because it has less IO.
You will find a similar situation on the Mega and Leonardo, which also don't have I2C on A4 and A5. This is why Arduino added the SDA and SCL pins in the R3 pinout. That way, the I2C bus is broken out to a standard location, which allows shields that use I2C communication to work on all boards. Any well designed shield will use those pins rather than assuming I2C is on A4 and A5. I'm surprised an Adafruit shield wouldn't do that. Maybe it's a very old shield from before the new Arduino pinout was established.
You'll also find the same situation with the SPI bus pins. On the original Uno, pins 11, 12, 13 are the SPI bus. On the Uno WiFi Rev2, the SPI bus is only broken out to the 2x3 ICSP header. That header is the universal location for the SPI bus pins.
PickyBiker:
If anyone knows of a pin-out diagram specific to the WiFi Rev2
There is also the schematic, which is downloadable from the "Documentation" tab of the product page:
It would be nice to have a pretty one like the Pighixx pinouts though. Arduino recently added some like that to the Nano 33 BLE product pages, so hopefully they'll eventually do the same for the other boards.
PickyBiker:
or some other documentation that explains this difference, it would be appreciated.
This should be documented in the table on the Wire library's reference page:
Unfortunately, that table has not been updated as new boards were added. You can see that not even the Zero is on that table, and that's been around for years! The same problem occurs on the SPI library's reference page, though it's not quite so outdated.
To help others avoid the same confusion you encountered, you might consider reporting this to the Arduino developers. You can submit an issue report here:
That's the best place to bring the situation to the attention of the people who have the access to edit the documentation.
Thanks Pert for all that information. I will open an issue at github and will link back to this post.
Just FYI: The display and backpack I'm using are brand new and current but they are not hardwired. I can wire the SDA and SCL to any Arduino pin. I just connected them to A4 and A5 because of my familiarity with the Arduino UNO.