// WiringPi test program: I2C functions (need PCF8574) // Compile: gcc -Wall wiringpi_i2c_test1.c -o wiringpi_i2c_test1 -lwiringPi #include "wpi_test.h" #include "pcf8574.h" #include "wiringPiI2C.h" const int pinBase = 1020; const int i2cAdress = 0x20; int ShowAll() { int in; int value = 0; printf("pin: 0 1 2 3 4 5 6 7\nval: "); for (int pin=0; pin<=7; ++pin) { in = digitalRead(pinBase + pin); printf("%d ", in); if(in==HIGH) { value |= (0x01<