how read I2C

Hi all,
I would like use I2C, but l’m newbie
i throw this
i2cdetect -y -r 1

this is response
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: – -- – -- – -- – -- – -- – -- –
10: – -- – -- – -- – -- – -- – -- – -- – --
20: – -- – -- – -- – -- – -- – -- – -- – --
30: – -- – -- – -- – -- – -- – -- – -- – --
40: – -- – -- – -- – -- – -- – -- – -- – --
50: – -- – -- UU UU UU UU – -- – -- – -- – --
60: – -- – -- – -- – -- – -- – -- – -- – --
70: – -- – -- – -- – --

How read this response ?
What we need for read the componement
if I mesure P9_19 and P9_20 i have a signal when i throw commande

thianks for help :slight_smile:

The above command scans the i2c-1 bus and reports the device address attached to it. In this case 0x54, 0x55, 0x56 and 0x57 are the device addresses, which are EEPROMs. The “UU” indicates, the address is already occupied by some driver.

You can check the p9_20 (I2C2_SDA) for sent data and ack replied back by devices in a oscilloscope, and p9_19 (I2C2_SCL) for i2c clock source.

For better understanding regarding the i2c-tools follow the below mentioned link -
http://www.lm-sensors.org/wiki/i2cToolsDocumentation

Thanks,

S.B.

thans’s i try this

root@beaglebone:~# i2cset -y 1 0x49 0x01 0x60
root@beaglebone:~# i2cget -y 1 0x49 0x00 w
0x3016
root@beaglebone:~#

how use this the commande console same with bonescript ?

thanks for reply

I try this

root@beaglebone:~# i2cset -y 1 0x49 0x01 0x60
root@beaglebone:~# i2cget -y 1 0x49 0x00
0xb016

i thinks is correctly,
now i would like in node js

I try this

var b=require(‘bonescript’);
var port=’/dev/i2c-1’;
b.i2cOpen(port,0x49,{});

b.i2cWriteBytes(port,0x01,0x60);
r =b.i2cReadBytes(port,0x00,2);
console.log®;

in the console show this result

<Buffer 38 70>

But now is not the same 0xb016
How i can do ?