Just a general query as got it all running although I expect my coding could be better. It all runs and flickers but I am assuming that is from the switching and can it be got rid off, or am I stuck with it?
I could use 3 more 74HC595 but was just seeing if I could get it working without. So really just after some feedback. Here is my code. I have 2 timing values one for overall, and one for switching between the 8-segment displays. Am only starting out so go easy
const int SERÂ Â = 8;
const int LATCHÂ = 9;
const int CLKÂ Â =10;
const int LED1Â Â =2; //on off for 7-segment one
const int LED2Â Â =3; //on off for 7-segment two
const int LED3Â Â =4; //on off for 7-segment three
const int LED4Â Â =5; //on off for 7-segment four
int interval = 200; //how many millis to cycle between numbers
int interval2 = 11; //delay between switching between 7-segment displays
int firstdigit = 0; //integers to hold individual digit values
int seconddigit = 0;
int thirddigit = 0;
int fourthdigit = 0;
//sequence of 0-10
int sequence[10] = {63,6,91,79,102,109,124,7,127,111}; //numbers 0-9 for segment
void showvalues(int one,int two, int three, int four) //function to display values
{
 unsigned long currentmillis = millis(); //store current millis
 do
 {
  digitalWrite(LATCH, LOW);
  shiftOut(SER, CLK, MSBFIRST, sequence[one]);
  digitalWrite(LATCH, HIGH);
  digitalWrite (LED1, HIGH);
  delay(interval2);
  digitalWrite (LED1, LOW);
 Â
  digitalWrite(LATCH, LOW);
  shiftOut(SER, CLK, MSBFIRST, sequence[two]);
  digitalWrite(LATCH, HIGH);
  digitalWrite (LED2, HIGH);
  delay(interval2);
  digitalWrite (LED2, LOW);
 Â
  digitalWrite(LATCH, LOW);
  shiftOut(SER, CLK, MSBFIRST, sequence[three]);
  digitalWrite(LATCH, HIGH);
  digitalWrite (LED3, HIGH);
  delay(interval2);
  digitalWrite (LED3, LOW);
 Â
  digitalWrite(LATCH, LOW);
  shiftOut(SER, CLK, MSBFIRST, sequence[four]);
  digitalWrite(LATCH, HIGH);
  digitalWrite (LED4, HIGH);
  delay(interval2);
  digitalWrite (LED4, LOW);
 Â
  Serial.print(one);
  Serial.print(" ");
  Serial.print(two);
  Serial.print(" ");
  Serial.print(three);
  Serial.print(" ");
  Serial.print(four);
  Serial.print(" currentmillis: ");
  Serial.print(currentmillis);
  Serial.print(" actual millis: ");
  Serial.println(millis());
 Â
  unsigned long int x = millis() - currentmillis;
 Â
 } while ((millis()-currentmillis) < interval);
}
void setup()
{
 Serial.begin(9600); //start serial
Â
 pinMode(SER, OUTPUT);
 pinMode(LATCH, OUTPUT);
 pinMode(CLK, OUTPUT);
 pinMode(LED1, OUTPUT);
 pinMode(LED2, OUTPUT);
 pinMode(LED3, OUTPUT);
 pinMode(LED4, OUTPUT);
}
void loop()
{
 for (int i = 0; i < 9999; i++)
 {
  int b = i;
  firstdigit = b % 10;
  b = b/10;
  seconddigit = b % 10;
  b=b/10;
  thirddigit = b % 10;
  b=b/10;
  fourthdigit = b % 10;
  showvalues(firstdigit, seconddigit, thirddigit, fourthdigit);
 }
}