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 1
1
Wire (I2C Master and Slave)
2
2
===========================
3
3
4
- The RP2040 has two I2C devices, ``i2c0 (Wire) `` and ``i2c1 (Wire1) ``
4
+ The RP2040 has two I2C devices, ``i2c0 (Wire) `` and ``i2c1 (Wire1) ``.
5
5
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:
9
11
10
12
.. code :: cpp
11
13
12
14
bool setSDA(pin_size_t sda);
13
15
bool setSCL(pin_size_t scl);
14
16
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.
16
22
17
23
Master transmissions are buffered (up to 128 bytes) and only performed
18
24
on ``endTransmission ``, as is standard with modern Arduino Wire implementations.
You can’t perform that action at this time.
0 commit comments