I have a Problem with the I2C device. Every time I try to open the device it
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 ?
From: Dave Hylands <dhylands@gm...> - 2007-06-12 22:46:59
> Hi everyone,
> 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:
What does lsmod show?
You need to have both the i2c-dev and i2c-pxa (which in turn requires i2c-core).
The normal procedure is to do:
Or add the following two lines to the end of /etc/modules
Loading i2c-pxa will automatically load i2c-core.
Vancouver, BC, Canada