From 2cce44b739724513488d0ce280bcf09e49d2e76d Mon Sep 17 00:00:00 2001 From: Testato Date: Sun, 16 Sep 2018 16:36:46 +0200 Subject: [PATCH] comment updated --- .../Wire/examples/i2c_scanner/i2c_scanner.ino | 39 +++++++++++-------- 1 file changed, 22 insertions(+), 17 deletions(-) diff --git a/libraries/Wire/examples/i2c_scanner/i2c_scanner.ino b/libraries/Wire/examples/i2c_scanner/i2c_scanner.ino index 000c730cb8..3e503a8cae 100644 --- a/libraries/Wire/examples/i2c_scanner/i2c_scanner.ino +++ b/libraries/Wire/examples/i2c_scanner/i2c_scanner.ino @@ -26,24 +26,29 @@ -// Example pinmap for Bluepill I2Cs (by Testato) -// -// I2C-1 standard pins: PB7(sda) PB6(scl) -// Use it by "Wire" without pin declaration -// -// I2C-1 alternative pins: PB9(sda) PB8(scl) -// Remap the first I2C before call begin() -// Wire.setSDA(PB9); -// Wire.setSCL(PB8); -// Wire.begin(); -// -// I2C-2: PB11(sda) PB10(scl) -// Wire.setSDA(PB11); -// Wire.setSCL(PB10); -// -// If you want to use the two I2Cs simultaneously, create a new instance for the second I2C -// TwoWire Wire2(PB11,PB10); +/* Example pinmap for Bluepill I2Cs (by Testato) + + I2C-1 standard pins: PB7(sda) PB6(scl) + Use it by "Wire" without pin declaration + Wire.begin(); + + I2C-1 alternative pins: PB9(sda) PB8(scl) + Remap the first I2C before call begin() + Wire.setSDA(PB9); + Wire.setSCL(PB8); + Wire.begin(); + + I2C-2: PB11(sda) PB10(scl) + Remap the second I2C before call begin() + Wire.setSDA(PB11); + Wire.setSCL(PB10); + Wire.begin(); + If you want to use the two I2Cs simultaneously, create a new instance for the second I2C + TwoWire Wire2(PB11,PB10); + Wire2.begin(); + +*/ #include