Place of Origin | china |
Brand Name | banana pi |
Model Number | Banana pi IO extend Board |
Certification | ce,fcc,rosh |
View Detail Information
Explore similar products
Banana Pi AV line
Banana Pi GPIO com3 line
Banana Pi 5V 2A DC adapter for EU
Banana Pi USB line
Product Specification
Place of Origin | china | Brand Name | banana pi |
Model Number | Banana pi IO extend Board | Certification | ce,fcc,rosh |
High Light | Banana pi IO extend Board ,raspberry extend board ,mini pc board arduino |
Use WiringPi write C code to test .
#include
#include
int SER = 12;
int RCLK = 10;
int class="lazy" src="/myres/images/load_icon.gif" data-originalLK = 14;
unsigned char LED[8]={0x01, 0x02, 0x04, 0x08, 0x10, 0x20, 0x40, 0x80};
void SIPO(unsigned char byte);
void pulse(int pin);
void init() {
pinMode(SER, OUTPUT);
pinMode(RCLK, OUTPUT);
pinMode(class="lazy" src="/myres/images/load_icon.gif" data-originalLK, OUTPUT);
digitalWrite(SER, 0);
digitalWrite(class="lazy" src="/myres/images/load_icon.gif" data-originalLK, 0);
digitalWrite(RCLK, 0);
}
void delayMS(int x) {
usleep(x * 1000);
}
int main (void)
{
if (-1 == wiringPiSetup()) {
printf("Setup wiringPi failed!");
return 1;
}
init();
int i;
while(1) {
for(i = 0; i < 8; i++)
{
SIPO(LED[i]);
pulse(RCLK);
delayMS(50);
printf(" i = %d", i);
}
printf("\n");
delayMS(500); // 500 ms
for(i = 7; i >= 0; i--)
{
SIPO(LED[i]);
pulse(RCLK);
delayMS(50);
printf(" i = %d", i);
}
delayMS(500); // 500 ms
}
usleep(1000);
digitalWrite(RCLK, 1);
}
void SIPO(unsigned char byte)
{
int i;
for (i=0;i<8;i++)
{
digitalWrite(SER,((byte & (0x80 >> i)) > 0));
pulse(class="lazy" src="/myres/images/load_icon.gif" data-originalLK);
}
}
void pulse(int pin)
{
digitalWrite(pin, 1);
digitalWrite(pin, 0);
}
Company Details
Business Type:
Manufacturer,Exporter,Seller
Year Established:
2004
Total Annual:
$5,000,000-$10,000,000
Employee Number:
50-100
Ecer Certification:
Active Member
SinoVoip Co.,Ltd was founded in 2004, is located in Nanshan District, Shenzhen Zhongxing Road Venture integrated five-story North Building. Since its inception, following the world's most advanced network technology, combined with practical application in China, ... SinoVoip Co.,Ltd was founded in 2004, is located in Nanshan District, Shenzhen Zhongxing Road Venture integrated five-story North Building. Since its inception, following the world's most advanced network technology, combined with practical application in China, ...
Get in touch with us
Leave a Message, we will call you back quickly!