// for the shift register int DataPin = 9; int LatchPin = 11; int ClockPin = 10; //For the 4017 chip int clock = 13; int Reset = 12; int m=0; int count; int shiftdelay=250; // This is the delay between the lighting of each segment. Set this to 3000 and see what happens int repeatdelay=25; //increasing this number will slow down the count. Decreasing this number will speed up the count //************************************************** Assigns the segments for the RIGHT number******************************* int numrt[10][15]= { {0,1,0,0,2,2,0,4,0,0,8,0,0,16,0}, //number 0 {0,1,0,0,0,2,0,0,0,0,0,0,0,0,0}, //number 1 {0,1,1,0,2,0,0,0,0,0,8,0,0,16,0}, //number 2 {0,1,1,0,2,2,0,0,0,0,0,0,0,16,0}, //number 3 {0,1,1,0,0,2,0,4,0,0,0,0,0,0,0}, //number 4 {0,0,1,0,2,2,0,4,0,0,0,0,0,16,0}, //number 5 {0,0,1,0,0,2,0,4,0,0,8,0,0,16,0}, //number 6 {0,1,0,0,2,2,0,0,0,0,0,0,0,0,0,}, //number 7 {0,1,1,0,2,2,0,4,0,0,8,0,0,16,0}, //number 8 {0,1,1,0,2,2,0,4,0,0,0,0,0,0,0} //number 9 }; //***********************************************Assigns the segments for the LEFT number************************************* int numlt[10][15]= { {1,0,0,2,0,0,4,0,0,8,0,8,16,0,0}, //number 0 {1,0,0,0,0,0,0,0,0,0,0,8,0,0,0}, //number 1 {1,0,0,2,0,0,0,0,4,8,0,0,16,0,0}, //number 2 {1,0,0,2,0,0,0,0,4,0,0,8,16,0,0}, //number 3 {1,0,0,0,0,0,4,0,4,0,0,8,0,0,0}, //number 4 {0,0,0,2,0,0,4,0,4,0,0,8,16,0,0}, //number 5 {0,0,0,0,0,0,4,0,4,8,0,8,16,0,0}, //number 6 {1,0,0,2,0,0,0,0,0,0,0,8,0,0,0}, //number 7 {1,0,0,2,0,0,4,0,4,8,0,8,16,0,0}, //number 8 {1,0,0,2,0,0,4,0,4,0,0,8,0,0,0} //number 9 }; void setup(){ pinMode(DataPin,OUTPUT); pinMode(ClockPin,OUTPUT); pinMode(LatchPin,OUTPUT); pinMode(clock,OUTPUT); pinMode(Reset,OUTPUT); //reseting the 4017 IC, you have to do this digitalWrite(Reset,HIGH); delayMicroseconds(5); digitalWrite(Reset,LOW); Serial.begin(9600); //This is not needed. I was using this during testing to see what values were. This line can be deleted. } void loop() { for (int z=0;z<10;z++) { count=0; for(int t=0;t9) { m=0; } else { } }