File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change 11Wire (I2C Master and Slave)
22===========================
33
4- The RP2040 has two I2C devices, ``i2c0 (Wire) `` and ``i2c1 (Wire1) ``
4+ The RP2040 has two I2C devices, ``i2c0 (Wire) `` and ``i2c1 (Wire1) ``.
55
6- The current implementation is compatible with the Arduino standard
7- with the addition of two calls to allof the `SDA ` and `SCL ` pins
8- to be set **before calling Wire.begin() **
6+ The default pins for `Wire ` and `Wire1 ` vary depending on which board you're using.
7+ (Here are the pinout diagrams for `Pico <https://datasheets.raspberrypi.org/pico/Pico-R3-A4-Pinout.pdf >`_
8+ and `Adafruit Feather <https://learn.adafruit.com/assets/100740 >`_.)
9+
10+ You may change these pins **before calling Wire.begin() or Wire1.begin() ** using:
911
1012.. code :: cpp
1113
1214 bool setSDA(pin_size_t sda);
1315 bool setSCL(pin_size_t scl);
1416
15- Both master and slave operation is supported.
17+ Be sure to use pins labeled ``I2C0 `` for Wire and ``I2C1 `` for Wire1 on the pinout
18+ diagram for your board, or it won't work.
19+
20+ Other than that, the API is compatible with the Arduino standard.
21+ Both master and slave operation are supported.
1622
1723Master transmissions are buffered (up to 128 bytes) and only performed
1824on ``endTransmission ``, as is standard with modern Arduino Wire implementations.
You can’t perform that action at this time.
0 commit comments