|
|
|
@ -127,7 +127,7 @@ int main(void) {
|
|
|
|
int arduinoI2C;
|
|
|
|
int arduinoI2C;
|
|
|
|
if ((arduinoI2C = open("/dev/i2c-0", O_RDWR)) < 0)
|
|
|
|
if ((arduinoI2C = open("/dev/i2c-0", O_RDWR)) < 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
printf"ERROR: /dev/i2c-0 bus not present\n");
|
|
|
|
printf("ERROR: /dev/i2c-0 bus not present\n");
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
arduinoI2C = wiringPiI2CSetupInterface("/dev/i2c-0", 0x4c);
|
|
|
|
arduinoI2C = wiringPiI2CSetupInterface("/dev/i2c-0", 0x4c);
|
|
|
|
printf("Arduio write: %d \n", wiringPiI2CWrite(arduinoI2C,42));
|
|
|
|
printf("Arduio write: %d \n", wiringPiI2CWrite(arduinoI2C,42));
|
|
|
|
|