Skip to content

Commit bd0f166

Browse files
authored
Update i2c_scanner.ino
1 parent 54bc27d commit bd0f166

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

libraries/Wire/examples/i2c_scanner/i2c_scanner.ino

+10-3
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,22 @@
2626

2727

2828

29-
// Pinmap for Bluepill I2Cs (by Testato)
29+
// Example pinmap for Bluepill I2Cs (by Testato)
3030
//
3131
// I2C-1 standard pins: PB7(sda) PB6(scl)
3232
// Use it by "Wire" without pin declaration
3333
//
3434
// I2C-1 alternative pins: PB9(sda) PB8(scl)
35-
// TwoWire Wire_alt(PB9,PB8);
35+
// Remap the first I2C befoure call begin
36+
// Wire.setSDA(PB9);
37+
// Wire.setSCL(PB8);
38+
// Wire.begin();
3639
//
37-
// I2C-2: PB9(sda) PB8(scl)
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
3845
// TwoWire Wire2(PB11,PB10);
3946

4047

0 commit comments

Comments
 (0)