Skip to content

Commit 2fcd26e

Browse files
authored
Merge pull request #323 from Testato/patch-3
I2C Scanner comment updated
2 parents 747adb6 + 2cce44b commit 2fcd26e

File tree

1 file changed

+22
-17
lines changed

1 file changed

+22
-17
lines changed

libraries/Wire/examples/i2c_scanner/i2c_scanner.ino

+22-17
Original file line numberDiff line numberDiff line change
@@ -26,24 +26,29 @@
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>

0 commit comments

Comments
 (0)