Java I2C communications

cant u use linux read() and write() system calls using i2c_dev…

I use inQt next code:

if((fd_adc = open("/dev/i2c/0", O_RDWR))!=NULL)
io_adc=ioctl(fd_adc, I2C_SLAVE, 0x48);
it runs.

2012/7/12 kiran nayak <>

when =x48 is the code of the i2c chip conected on board. you can use i2cdetect to know that code.

For read:
read(fd_adc,&value, 2); When 2 is the number of bytes. The value will be loaded in “value” .

2012/7/12 Ramon Benavent <>