I have the above configuration. Trying to communicate. I set the switches so it is address 07. when plugged in, the Motor Controller lights up. But I cannot communicate with it. I have a small snippet of code that gets the error. The call to wiringPiI2CSetup() returns fine.
The call to wiringPiI2CWrite() returns a -1. Can anyone shed some light on what else needs to be set up?
thanks!
int main()
{
int fd ;
int error ;
usleep(10000);
printf("setup begin\n");
fd=wiringPiI2CSetup(0x07);
if(-1==fd)
{
printf("MotorSetup: Can't setup the I2C device\n");
}
error = wiringPiI2CWrite(fd, 255);
if(0 != error)
{
printf(" error %d\n", error);
return ;
}
}