#define segA2 #define segB3 #define segC4 #define segD5 #define segE6 #define segF7 #define segG8 int count=0; void setup() { for(int i=2;i<9;i++) { pinMode(i,OUTPUT); } } void loop() { swich(Count) { case 0: digitalWrite[segA,HIGH); digitalWrite[segB,HIGH); digitalWrite[segC,HIGH); digitalWrite[segD,HIGH); digitalWrite[segE,HIGH); digitalWrite[segF,HIGH); digitalWrite[segG,LOW); break; case 1: digitalWrite[segA,LOW); digitalWrite[segB,HIGH); digitalWrite[segC,HIGH); digitalWrite[segD,LOW); digitalWrite[segE,LOW); digitalWrite[segF,LOW); digitalWrite[segG,LOW); break; case 2: digitalWrite[segA,HIGH); digitalWrite[segB,HIGH); digitalWrite[segC,LOW); digitalWrite[segD,HIGH); digitalWrite[segE,HIGH); digitalWrite[segF,LOW); digitalWrite[segG,HIGH); break; case 3: digitalWrite[segA,HIGH); digitalWrite[segB,HIGH); digitalWrite[segC,HIGH); digitalWrite[segD,HIGH); digitalWrite[segE,LOW); digitalWrite[segF,LOW); digitalWrite[segG,HIGH); break; case 4: digitalWrite[segA,LOW); digitalWrite[segB,HIGH); digitalWrite[segC,HIGH); digitalWrite[segD,LOW); digitalWrite[segE,LOW); digitalWrite[segF,HIGH); digitalWrite[segG,HIGH); break; case 5: digitalWrite[segA,HIGH); digitalWrite[segB,LOW); digitalWrite[segC,HIGH); digitalWrite[segD,HIGH); digitalWrite[segE,LOW); digitalWrite[segF,HIGH); digitalWrite[segG,HIGH); break; case 6: digitalWrite[segA,HIGH); digitalWrite[segB,LOW); digitalWrite[segC,HIGH); digitalWrite[segD,HIGH); digitalWrite[segE,HIGH); digitalWrite[segF,HIGH); digitalWrite[segG,HIGH); break; case 7: digitalWrite[segA,HIGH); digitalWrite[segB,HIGH); digitalWrite[segC,HIGH); digitalWrite[segD,LOW); digitalWrite[segE,LOW); digitalWrite[segF,LOW); digitalWrite[segG,LOW); break; case 8: digitalWrite[segA,HIGH); digitalWrite[segB,HIGH); digitalWrite[segC,HIGH); digitalWrite[segD,HIGH); digitalWrite[segE,HIGH); digitalWrite[segF,HIGH); digitalWrite[segG,HIGH); break; case 9: digitalWrite[segA,HIGH); digitalWrite[segB,HIGH); digitalWrite[segC,HIGH); digitalWrite[segD,HIGH); digitalWrite[segE,LOW); digitalWrite[segF,HIGH); digitalWrite[segG,HIGH); break; break; } if(count<10) { count++; delay(1000); } if(count==10) { count=0; delay(1000); } }