Not quite. If you are trying to find the default Wire pins for any board you can follow this process:
-
Check the “variant.h” file for the definition of “AP3_Wire_IOM”
-
Refer to the Apollo3 datasheet to see which pads that IOM uses for SDA / SCL
-
See if those pads are listed in the variants pin map in “variant.cpp” (if they are not then it is possible that they are not directly accessible by the user, for example hidden within the Qwiic connector)
Applying these steps to the RBA Nano:
- “variant.h” lists “AP3_Wire_IOM” as “2”
https://github.com/sparkfun/Arduino_Apo … /variant.h
- Apollo3 Blue datasheet shows that IOM2 uses pads 25 and 27 for “M2SDAWIR3” and “M2SCL” respectively
https://cdn.sparkfun.com/assets/learn_t … v0_9_1.pdf
- The “variant.cpp” pin map does list 25 and 27 (they are Arduino pins 17 and 18). That means you can control them with standard Arduin functions like digitalWrite() and pinMode(). However looking on the silkscreen of the board there are no pins labeled 17 or 18. What gives? Well these pins are within the Qwiic connector. This makes it really easy to use other Qwiic products on the Wire bus.
https://github.com/sparkfun/Arduino_Apo … ariant.cpp
Footnote: what if you don’t want to use the Qwiic connector?
- Find exposed pins on your board that are I2C capable that use just one IOM instance.
on RBA Nano you have these options:
-
pins 7 and 6 using IOM3
-
pins 9 and 10 using IOM4
-
pins 11 and 13 using IOM0
- Use the IOM number (#) to construct your own Two_Wire object - it is forced to use the associated pins b/c there is no pin muxing on Apollo3 IOMs
Two_Wire myWire(#);
- Use that Two_Wire object just like you would have used “Wire”
myWire.begin()
myWire.read()
etc...