5611AH 数码管 引脚图


此页面通过工具从 csdn 导出,格式可能有问题。


arduino套装,给了个5611AH的数码管。在网上找不到现成的引脚图,无奈只好自己画了。初学arduino第一天,不懂得标准,还望见谅。


图示

代码:

  int a[10][10]={{0,0,0,1,1,1,1,1,1,0},
               {0,0,0,0,1,1,0,0,0,0},
               {0,0,0,1,1,0,1,1,0,1},
               {0,0,0,1,1,1,1,0,0,1},
               {0,0,0,0,1,1,0,0,1,1},
               {0,0,0,1,0,1,1,0,1,1},
               {0,0,0,1,0,1,1,1,1,1},
               {0,0,0,1,1,1,0,0,0,0},
               {0,0,0,1,1,1,1,1,1,1},
               {0,0,0,1,1,1,1,0,1,1},};
void setup(){
  for (int i=3;i<=9;i++) {
    pinMode(i,OUTPUT);
  }
}
void printf(int v){
  for (int i=3;i<=9;i++){
    digitalWrite(i,a[v][i]);
  }
}
void loop(){
  for (int i=0;i<=9;i++){
    printf(i);
    delay(400);
  }
}

我的乱七八糟的接线



Avatar
huiren
Code Artisan

问渠那得清如许,为有源头活水来

下一页
上一页
comments powered by Disqus