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:
2:e90c47d4f358
Parent:
1:2363995f603f
Child:
3:8def8fb70765
--- a/main.cpp	Sun Mar 20 23:48:48 2016 +0000
+++ b/main.cpp	Sun Mar 20 23:51:00 2016 +0000
@@ -1,10 +1,15 @@
 /* Scan I2C bus on specified pins and prints out
-* the address of all pins where a active responder
+* the all address where a active responder
 * is found. 
 *
 * By Joe Elsworth CTO of A2WH
 * Free use for al but no warranty, no promises.
-* Don't forget 3K pullup sda,scl */
+* Don't forget 3K pullup sda,scl 
+* 
+* I tested this by soldering in a I2C chip known to respond at
+* address dec=120 hex=70 and the utility got the ack as expected.
+* when the chip was de-soldered it was no longer detected.  
+*/
 
 #include "mbed.h"