[Banana pi Accessories] BP-I2C GPIO extend board


(bpi team) #1

how to connect to BPI

Example and Test Code(wiringPi):

#include <wiringPi.h> 
#include <pcf8574.h> 
#include <stdio.h> 
int main() 
{ 
        int i; 
        pcf8574Setup(100,0x27);                                  
        for(i=0;i<8;i++) pinMode(100+i,OUTPUT);                                                                                                
        while(1)                                                 
        { 
                i = 0; 
                for(i=0;i<=8;i++)                                             
                { 
                        printf("Current LED = %d\n",100+i);                      
                        digitalWrite((100+i),HIGH);                       
                        delay(500);                                       
                        digitalWrite((100+i),0);                         
                        delay(500);                                       
                } 
        } 
   
}

(Edmilson Junior) #2

Can use this on bpi m64 running android?


(bpi team) #3

yes. also can run on BPI-M64