I have a Problem with the I2C device. Every time I try to open the device it returns -1.
I can see the device under /dev/i2c_0. This is my code:
int main( )
int fd = 0;
std::cout << "I2C communication test begin." << std::endl;
fd = open( "/dev/i2c_0", O_RDWR );
if( fd < 0 )
std::cout << "I2C device open: Fail" << std::endl;
exit( 1 );
std::cout << "I2C device open: Pass" << std::endl;
Is there anything I did not consider ?