Scanning i2c on Intel Edison to find a new device

i2cdetect -a -r 6 

This will result all the devices addresses that returned the scanning probe.

root@edison:/home# i2cdetect -a -r 6                                                                                                                                        
WARNING! This program can confuse your I2C bus, cause data loss and worse!                                                                                                  
I will probe file /dev/i2c-6 using read byte commands.                                                                                                                      
I will probe address range 0x00-0x7f.                                                                                                                                       
Continue? [Y/n] y                                                                                                                                                           
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f                                                                                                                         
00: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                         
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                         
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                         
30: -- -- -- -- -- -- -- -- -- -- -- -- 3c -- -- --                                                                                                                         
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                         
50: -- -- -- 53 -- -- -- 57 -- -- -- -- -- -- -- --                                                                                                                         
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                         
70: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --                                                                                                                         
root@edison:/home#    

This time I was look for the 0x57 device, that I recently connected to the i2c bus.

Get the device data:

i2cdump -y -f 6 0x57 

The result:

root@edison:~# i2cdump -y -f 6 0x57                                                                                             
No size specified (using byte-data access)                                                                                      
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f    0123456789abcdef                                                         
00: 00 00 00 0f 00 00 03 00 00 00 00 00 00 00 00 00    ...?..?.........                                                         
10: 00 00 00 00 00 00 00 00 ff ff ff ff ff ff ff ff    ................                                                         
20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
30: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
40: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
50: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
60: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
70: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
80: 00 00 00 00 00 ff af af af af af af af 01 af af    ......??????????                                                         
90: af af af af af af af af af af af af af af af af    ????????????????                                                         
a0: af af af af af af af af af af af af af af af af    ????????????????                                                         
b0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
c0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
d0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
e0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff    ................                                                         
f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff 05 11    ..............?? 

Get data from an address on the device:

i2cget -y -f 6 0x57 0x06  

Result:

root@edison:~# i2cget -y -f 6 0x57 0x06                                                                                         
0x03       

Send data to the device:

i2cset -y -f 6 0x57 0x06 0x03 

// I2C-6, endereço 57h, registrador 06h, escreve 03h