File tree Expand file tree Collapse file tree 1 file changed +22
-17
lines changed
libraries/Wire/examples/i2c_scanner Expand file tree Collapse file tree 1 file changed +22
-17
lines changed Original file line number Diff line number Diff line change 2626
2727
2828
29- // Example pinmap for Bluepill I2Cs (by Testato)
30- //
31- // I2C-1 standard pins: PB7(sda) PB6(scl)
32- // Use it by "Wire" without pin declaration
33- //
34- // I2C-1 alternative pins: PB9(sda) PB8(scl)
35- // Remap the first I2C before call begin( )
36- // Wire.setSDA(PB9);
37- // Wire.setSCL(PB8 );
38- // Wire.begin( );
39- //
40- // I2C-2: PB11(sda) PB10(scl)
41- // Wire.setSDA( PB11);
42- // Wire.setSCL(PB10);
43- //
44- // If you want to use the two I2Cs simultaneously, create a new instance for the second I2C
45- // TwoWire Wire2(PB11,PB10 );
29+ /* Example pinmap for Bluepill I2Cs (by Testato)
30+
31+ I2C-1 standard pins: PB7(sda) PB6(scl)
32+ Use it by "Wire" without pin declaration
33+ Wire.begin();
34+
35+ I2C-1 alternative pins: PB9(sda) PB8(scl )
36+ Remap the first I2C before call begin()
37+ Wire.setSDA(PB9 );
38+ Wire.setSCL(PB8 );
39+ Wire.begin();
40+
41+ I2C-2: PB11(sda) PB10(scl)
42+ Remap the second I2C before call begin()
43+ Wire.setSDA(PB11);
44+ Wire.setSCL(PB10);
45+ Wire.begin( );
4646
47+ If you want to use the two I2Cs simultaneously, create a new instance for the second I2C
48+ TwoWire Wire2(PB11,PB10);
49+ Wire2.begin();
50+
51+ */
4752
4853
4954#include < Wire.h>
You can’t perform that action at this time.
0 commit comments