I2C address scanner - Scans I2C bus on specified pins and prints all addresses where a active responder is found.

Dependencies:   mbed

Find address for I2C device

Scans all addreses on a I2C bus and reports those it is able to sucessfully communicate with.

One problem with I2C is that sometimes we receive chips without proper documentation and can not determine what address we should use ot communicate with that chip. This library seeks to identify the chips by attempting to communicate with each address and if it suceeds it assumes there is a chip present.

I have tested this with a clock chip, temperature sensor, OLED device and FRAM chip. It worked for all of them but there is a chance that some chips will not respond without a specific API call so there may be some chips it could not locate.

Revision:
1:2363995f603f
Parent:
0:befb557584fb
Child:
2:e90c47d4f358
--- a/main.cpp	Sun Mar 20 23:28:31 2016 +0000
+++ b/main.cpp	Sun Mar 20 23:48:48 2016 +0000
@@ -11,7 +11,7 @@
 
 Serial pc(USBTX, USBRX);
 
- #define D_SDA                  PB_7 // specific for Nucleo-F303K8
+ #define D_SDA                  PB_7 
  #define D_SCL                  PB_6 
    // sda=PB7, scl=PB_6 Pins specific to Nucleo-F303K8
   // must change pins to match your board.