int big = 2;
int push= 3;
int data=4;
int putnumber[8]={1,1,1,1,1,1,1,1};
void setup(){
pinMode(big,OUTPUT);
pinMode(push,OUTPUT);
pinMode(data,OUTPUT);
}
void loop(){
digitalWrite(big,LOW);
for (int i = 0; i < 8; i++)
{
put(putnumber[i]);
}
digitalWrite(big,HIGH);
}
void put(int number){
digitalWrite(push,LOW);
digitalWrite(data,number);
digitalWrite(push,HIGH);
}
arduino 74hc595n 扩展
最新推荐文章于 2023-11-15 09:40:26 发布