Skip to content

I2C Scanner comment updated #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 19, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 22 additions & 17 deletions libraries/Wire/examples/i2c_scanner/i2c_scanner.ino
Original file line number Diff line number Diff line change
Expand Up @@ -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 <Wire.h>
Expand Down