3a - Program left 5 odds displays

ABOUT THE COURSE

We will go over the final code for the left 5 odds displays (1/2 - 2/3).

Video #1

Left 5 boards
 
    #include 
  
  int h45odds = 0;
  int h35odds = 0;
  int h34odds = 0;
  int h25odds = 0;
  int h24odds = 0;
  
  int h12odds = 0;
  int h13odds = 0;
  int h14odds = 0;
  int h15odds = 0;
  int h23odds = 0;
  
  long lastrace = 0;
  
  long x = 0;
  long y = 0;
  
  long count = 0;
  long count1 = 0;
  
        byte LT[8] = 
        {
         B00111,
         B01111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111
        };

        byte UB[8] =
        {
         B11111,
         B11111,
         B11111,
         B00000,
         B00000,
         B00000,
         B00000,
         B00000
        };

        byte RT[8] =
        {
         B11100,
         B11110,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111
        };

        byte LL[8] =
        {
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B01111,
         B00111
        };

        byte LB[8] =
        {
         B00000,
         B00000,
         B00000,
         B00000,
         B00000,
         B11111,
         B11111,
         B11111
        };

        byte LR[8] =
        {
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11110,
         B11100
        };

        byte MB[8] =
        {
         B11111,
         B11111,
         B11111,
         B00000,
         B00000,
         B00000,
         B11111,
         B11111
        };

        byte block[8] =
        {
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111
        };

  LiquidCrystal horse23(23, 22, 25, 24, 27, 26);
  LiquidCrystal horse15(29, 28, 31, 30, 33, 32);
  LiquidCrystal horse14(35, 34, 37, 36, 39, 38);
  LiquidCrystal horse13(41, 40, 43, 42, 45, 44);
  LiquidCrystal horse12(47, 46, 49, 48, 51, 50);  
  
  void setup()
  {
    Serial.begin(9600);
    
         horse23.createChar(0,LT);
         horse23.createChar(1,UB);
         horse23.createChar(2,RT);
         horse23.createChar(3,LL);
         horse23.createChar(4,LB);
         horse23.createChar(5,LR);
         horse23.createChar(6,MB);
         horse23.createChar(7,block);

         horse15.createChar(0,LT);
         horse15.createChar(1,UB);
         horse15.createChar(2,RT);
         horse15.createChar(3,LL);
         horse15.createChar(4,LB);
         horse15.createChar(5,LR);
         horse15.createChar(6,MB);
         horse15.createChar(7,block);        

         horse14.createChar(0,LT);
         horse14.createChar(1,UB);
         horse14.createChar(2,RT);
         horse14.createChar(3,LL);
         horse14.createChar(4,LB);
         horse14.createChar(5,LR);
         horse14.createChar(6,MB);
         horse14.createChar(7,block);        

         horse13.createChar(0,LT);
         horse13.createChar(1,UB);
         horse13.createChar(2,RT);
         horse13.createChar(3,LL);
         horse13.createChar(4,LB);
         horse13.createChar(5,LR);
         horse13.createChar(6,MB);
         horse13.createChar(7,block);        

         horse12.createChar(0,LT);
         horse12.createChar(1,UB);
         horse12.createChar(2,RT);
         horse12.createChar(3,LL);
         horse12.createChar(4,LB);
         horse12.createChar(5,LR);
         horse12.createChar(6,MB);
         horse12.createChar(7,block);   
   
         horse23.begin(16, 2);
         horse15.begin(16, 2);
         horse14.begin(16, 2);
         horse13.begin(16, 2);
         horse12.begin(16, 2);    
      
         pinMode(8, OUTPUT);
         pinMode(9, OUTPUT);
         pinMode(10, OUTPUT);
         pinMode(11, OUTPUT);
         pinMode(12, OUTPUT);

         digitalWrite(8, HIGH);
         digitalWrite(9, HIGH);
         digitalWrite(10, HIGH);
         digitalWrite(11, HIGH);
         digitalWrite(12, HIGH);
  }

        void custom0()
        { // uses segments to build the number 0
         horse23.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse23.write(8);  // call each segment to create
         horse23.write(1);  // top half of the number
         horse23.write(2);
         horse23.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse23.write(3);  // call each segment to create
         horse23.write(4);  // bottom half of the number
         horse23.write(5);
        }
       
        void custom1()
        {
         horse23.setCursor(0+x,0);
         horse23.write(1);
         horse23.write(2);
         horse23.setCursor(0+x,1);
         horse23.write(4);
         horse23.write(7);
         horse23.write(4);
        }
        
        void custom2()
        {
         horse23.setCursor(0+x,0);
         horse23.write(6);
         horse23.write(6);
         horse23.write(2);
         horse23.setCursor(0+x, 1);
         horse23.write(3);
         horse23.write(4);
         horse23.write(4);
        }
       
        void custom3()
        {
         horse23.setCursor(0+x,0);
         horse23.write(6);
         horse23.write(6);
         horse23.write(2);
         horse23.setCursor(0+x, 1);
         horse23.write(4);
         horse23.write(4);
         horse23.write(5); 
        }
        
        void custom4()
        {
         horse23.setCursor(0+x,0);
         horse23.write(3);
         horse23.write(4);
         horse23.write(7);
         horse23.setCursor(2+x, 1);
         horse23.write(7);
        }
        
        void custom5()
        {
         horse23.setCursor(0+x,0);
         horse23.write(3);
         horse23.write(6);
         horse23.write(6);
         horse23.setCursor(0+x, 1);
         horse23.write(4);
         horse23.write(4);
         horse23.write(5);
        }
        
        void custom6()
        {
         horse23.setCursor(0+x,0);
         horse23.write(8);
         horse23.write(6);
         horse23.write(6);
         horse23.setCursor(0+x, 1);
         horse23.write(3);
         horse23.write(4);
         horse23.write(5);
        }
        
        void custom7()
        {
         horse23.setCursor(0+x,0);
         horse23.write(1);
         horse23.write(1);
         horse23.write(2);
         horse23.setCursor(2+x, 1);
         horse23.write(7);
        }
        
        void custom8()
        {
         horse23.setCursor(0+x,0);
         horse23.write(8);
         horse23.write(6);
         horse23.write(2);
         horse23.setCursor(0+x, 1);
         horse23.write(3);
         horse23.write(4);
         horse23.write(5);
        }
        
        void custom9()
        {
         horse23.setCursor(0+x,0);
         horse23.write(8);
         horse23.write(6);
         horse23.write(2);
         horse23.setCursor(2+x, 1);
         horse23.write(7);
        }
        
        // count 2
        
        void custom02()
        { // uses segments to build the number 0
         horse15.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse15.write(8);  // call each segment to create
         horse15.write(1);  // top half of the number
         horse15.write(2);
         horse15.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse15.write(3);  // call each segment to create
         horse15.write(4);  // bottom half of the number
         horse15.write(5);
        }
        
        void custom12()
        {
         horse15.setCursor(0+x,0);
         horse15.write(1);
         horse15.write(2);
         horse15.setCursor(0+x,1);
         horse15.write(4);
         horse15.write(7);
         horse15.write(4);
        }
        
        void custom22()
        {
         horse15.setCursor(0+x,0);
         horse15.write(6);
         horse15.write(6);
         horse15.write(2);
         horse15.setCursor(0+x, 1);
         horse15.write(3);
         horse15.write(4);
         horse15.write(4);
        }
        
        void custom32()
        {
         horse15.setCursor(0+x,0);
         horse15.write(6);
         horse15.write(6);
         horse15.write(2);
         horse15.setCursor(0+x, 1);
         horse15.write(4);
         horse15.write(4);
         horse15.write(5); 
        }
        
        void custom42()
        {
         horse15.setCursor(0+x,0);
         horse15.write(3);
         horse15.write(4);
         horse15.write(7);
         horse15.setCursor(2+x, 1);
         horse15.write(7);
        }
        
        void custom52()
        {
         horse15.setCursor(0+x,0);
         horse15.write(3);
         horse15.write(6);
         horse15.write(6);
         horse15.setCursor(0+x, 1);
         horse15.write(4);
         horse15.write(4);
         horse15.write(5);
        }
        
        void custom62()
        {
         horse15.setCursor(0+x,0);
         horse15.write(8);
         horse15.write(6);
         horse15.write(6);
         horse15.setCursor(0+x, 1);
         horse15.write(3);
         horse15.write(4);
         horse15.write(5);
        }
        
        void custom72()
        {
         horse15.setCursor(0+x,0);
         horse15.write(1);
         horse15.write(1);
         horse15.write(2);
         horse15.setCursor(2+x, 1);
         horse15.write(7);
        }
        
        void custom82()
        {
         horse15.setCursor(0+x,0);
         horse15.write(8);
         horse15.write(6);
         horse15.write(2);
         horse15.setCursor(0+x, 1);
         horse15.write(3);
         horse15.write(4);
         horse15.write(5);
        }
        
        void custom92()
        {
         horse15.setCursor(0+x,0);
         horse15.write(8);
         horse15.write(6);
         horse15.write(2);
         horse15.setCursor(2+x, 1);
         horse15.write(7);
        }
        
        // count 3
        
        void custom03()
        { // uses segments to build the number 0
         horse14.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse14.write(8);  // call each segment to create
         horse14.write(1);  // top half of the number
         horse14.write(2);
         horse14.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse14.write(3);  // call each segment to create
         horse14.write(4);  // bottom half of the number
         horse14.write(5);
        }
        
        void custom13()
        {
         horse14.setCursor(0+x,0);
         horse14.write(1);
         horse14.write(2);
         horse14.setCursor(0+x,1);
         horse14.write(4);
         horse14.write(7);
         horse14.write(4);
        }
        
        void custom23()
        {
         horse14.setCursor(0+x,0);
         horse14.write(6);
         horse14.write(6);
         horse14.write(2);
         horse14.setCursor(0+x, 1);
         horse14.write(3);
         horse14.write(4);
         horse14.write(4);
        }
        
        void custom33()
        {
         horse14.setCursor(0+x,0);
         horse14.write(6);
         horse14.write(6);
         horse14.write(2);
         horse14.setCursor(0+x, 1);
         horse14.write(4);
         horse14.write(4);
         horse14.write(5); 
        }
        
        void custom43()
        {
         horse14.setCursor(0+x,0);
         horse14.write(3);
         horse14.write(4);
         horse14.write(7);
         horse14.setCursor(2+x, 1);
         horse14.write(7);
        }
        
        void custom53()
        {
         horse14.setCursor(0+x,0);
         horse14.write(3);
         horse14.write(6);
         horse14.write(6);
         horse14.setCursor(0+x, 1);
         horse14.write(4);
         horse14.write(4);
         horse14.write(5);
        }

      
        void custom63()
        {
         horse14.setCursor(0+x,0);
         horse14.write(8);
         horse14.write(6);
         horse14.write(6);
         horse14.setCursor(0+x, 1);
         horse14.write(3);
         horse14.write(4);
         horse14.write(5);
        }
        
        void custom73()
        {
         horse14.setCursor(0+x,0);
         horse14.write(1);
         horse14.write(1);
         horse14.write(2);
         horse14.setCursor(2+x, 1);
         horse14.write(7);
        }
        
        void custom83()
        {
         horse14.setCursor(0+x,0);
         horse14.write(8);
         horse14.write(6);
         horse14.write(2);
         horse14.setCursor(0+x, 1);
         horse14.write(3);
         horse14.write(4);
         horse14.write(5);
        }
        
        void custom93()
        {
         horse14.setCursor(0+x,0);
         horse14.write(8);
         horse14.write(6);
         horse14.write(2);
         horse14.setCursor(2+x, 1);
         horse14.write(7);
        }
        
        // count 4
        
        void custom04()
        { // uses segments to build the number 0
         horse13.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse13.write(8);  // call each segment to create
         horse13.write(1);  // top half of the number
         horse13.write(2);
         horse13.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse13.write(3);  // call each segment to create
         horse13.write(4);  // bottom half of the number
         horse13.write(5);
        }
        
        void custom14()
        {
         horse13.setCursor(0+x,0);
         horse13.write(1);
         horse13.write(2);
         horse13.setCursor(0+x,1);
         horse13.write(4);
         horse13.write(7);
         horse13.write(4);
        }
        
        void custom24()
        {
         horse13.setCursor(0+x,0);
         horse13.write(6);
         horse13.write(6);
         horse13.write(2);
         horse13.setCursor(0+x, 1);
         horse13.write(3);
         horse13.write(4);
         horse13.write(4);
        }
        
        void custom34()
        {
         horse13.setCursor(0+x,0);
         horse13.write(6);
         horse13.write(6);
         horse13.write(2);
         horse13.setCursor(0+x, 1);
         horse13.write(4);
         horse13.write(4);
         horse13.write(5); 
        }
        
        void custom44()
        {
         horse13.setCursor(0+x,0);
         horse13.write(3);
         horse13.write(4);
         horse13.write(7);
         horse13.setCursor(2+x, 1);
         horse13.write(7);
        }
        
        void custom54()
        {
         horse13.setCursor(0+x,0);
         horse13.write(3);
         horse13.write(6);
         horse13.write(6);
         horse13.setCursor(0+x, 1);
         horse13.write(4);
         horse13.write(4);
         horse13.write(5);
        }
        
        void custom64()
        {
         horse13.setCursor(0+x,0);
         horse13.write(8);
         horse13.write(6);
         horse13.write(6);
         horse13.setCursor(0+x, 1);
         horse13.write(3);
         horse13.write(4);
         horse13.write(5);
        }
        
        void custom74()
        {
         horse13.setCursor(0+x,0);
         horse13.write(1);
         horse13.write(1);
         horse13.write(2);
         horse13.setCursor(2+x, 1);
         horse13.write(7);
        }
        
        void custom84()
        {
         horse13.setCursor(0+x,0);
         horse13.write(8);
         horse13.write(6);
         horse13.write(2);
         horse13.setCursor(0+x, 1);
         horse13.write(3);
         horse13.write(4);
         horse13.write(5);
        }
        
        void custom94()
        {
         horse13.setCursor(0+x,0);
         horse13.write(8);
         horse13.write(6);
         horse13.write(2);
         horse13.setCursor(2+x, 1);
         horse13.write(7);
        }
        
        // count 5
        
        void custom05()
        { // uses segments to build the number 0
         horse12.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse12.write(8);  // call each segment to create
         horse12.write(1);  // top half of the number
         horse12.write(2);
         horse12.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse12.write(3);  // call each segment to create
         horse12.write(4);  // bottom half of the number
         horse12.write(5);
        }
        
        void custom15()
        {
         horse12.setCursor(0+x,0);
         horse12.write(1);
         horse12.write(2);
         horse12.setCursor(0+x,1);
         horse12.write(4);
         horse12.write(7);
         horse12.write(4);
        }
        
        void custom25()
        {
         horse12.setCursor(0+x,0);
         horse12.write(6);
         horse12.write(6);
         horse12.write(2);
         horse12.setCursor(0+x, 1);
         horse12.write(3);
         horse12.write(4);
         horse12.write(4);
        }
        

       void custom35()
        {
         horse12.setCursor(0+x,0);
         horse12.write(6);
         horse12.write(6);
         horse12.write(2);
         horse12.setCursor(0+x, 1);
         horse12.write(4);
         horse12.write(4);
         horse12.write(5); 
        }
        
        void custom45()
        {
         horse12.setCursor(0+x,0);
         horse12.write(3);
         horse12.write(4);
         horse12.write(7);
         horse12.setCursor(2+x, 1);
         horse12.write(7);
        }
        
        void custom55()
        {
         horse12.setCursor(0+x,0);
         horse12.write(3);
         horse12.write(6);
         horse12.write(6);
         horse12.setCursor(0+x, 1);
         horse12.write(4);
         horse12.write(4);
         horse12.write(5);
        }
        
        void custom65()
        {
         horse12.setCursor(0+x,0);
         horse12.write(8);
         horse12.write(6);
         horse12.write(6);
         horse12.setCursor(0+x, 1);
         horse12.write(3);
         horse12.write(4);
         horse12.write(5);
        }
        
        void custom75()
        {
         horse12.setCursor(0+x,0);
         horse12.write(1);
         horse12.write(1);
         horse12.write(2);
         horse12.setCursor(2+x, 1);
         horse12.write(7);
        }
        
        void custom85()
        {
         horse12.setCursor(0+x,0);
         horse12.write(8);
         horse12.write(6);
         horse12.write(2);
         horse12.setCursor(0+x, 1);
         horse12.write(3);
         horse12.write(4);
         horse12.write(5);
        }
        
        void custom95()
        {
         horse12.setCursor(0+x,0);
         horse12.write(8);
         horse12.write(6);
         horse12.write(2);
         horse12.setCursor(2+x, 1);
         horse12.write(7);
        }
 
   void loop()
   {
     if (Serial.available() > 0 && Serial.available() != lastrace)
     {
       lastrace = Serial.available();
       x = Serial.parseInt();  // 12345
       y = int(x * .1);   // 1234
       y = y * 10;   // 12340
       y = x - y;   // 12345 - 12340 = 5
       
       if (y != 4)
       {
         horse23.clear();
         digitalWrite(8, LOW);
       }
       
       if (y != 3)
       {
         horse15.clear();
         digitalWrite(9, LOW);
       }
       if (y != 2)
       {
         horse14.clear();
         digitalWrite(10, LOW);
       }
       if (y != 1)
       {
         horse13.clear();
         digitalWrite(11, LOW);
       }
       if (y != 0)
       {
         horse12.clear();
         digitalWrite(12, LOW);
       }
       
       delay(4000);
       
       digitalWrite(8, HIGH);
       digitalWrite(9, HIGH);
       digitalWrite(10, HIGH);
       digitalWrite(11, HIGH);
       digitalWrite(12, HIGH);
       
       horse23.clear();
       horse15.clear();
       horse14.clear();
       horse13.clear();
       horse12.clear(); 
       
       x = int(x * .001);   // 12345 = 12
       
        switch(x)
          {
            case 10:
              h12odds = 14;
              h13odds = 9;
              h14odds = 39;
              h15odds = 5;
              h23odds = 11;
              h24odds = 47;
              h25odds = 6;
              h34odds = 23;
              h35odds = 3;
              h45odds = 12;
            break;
            
            case 11:
              h12odds = 9;
              h13odds = 21;
              h14odds = 11;
              h15odds = 36;
              h23odds = 6;
              h24odds = 3;
              h25odds = 10;
              h34odds = 7;
              h35odds = 23;
              h45odds = 12;
            break;
    
            case 12:
              h12odds = 19;
              h13odds = 3;
              h14odds = 6;
              h15odds = 25;
              h23odds = 9;
              h24odds = 18;
              h25odds = 76;
              h34odds = 4;
              h35odds = 17;
              h45odds = 34;
            break;
      
            case 13:
              h12odds = 10;
              h13odds = 7;
              h14odds = 6;
              h15odds = 4;
              h23odds = 23;
              h24odds = 20;
              h25odds = 13;
              h34odds = 14;
              h35odds = 9;
              h45odds = 8;
            break;
      
            case 14:
              h12odds = 2;
              h13odds = 34;
              h14odds = 8;
              h15odds = 5;
              h23odds = 49;
              h24odds = 12;
              h25odds = 7;
              h34odds = 200;
              h35odds = 119;
              h45odds = 29;
            break;
      
            case 15:
              h12odds = 95;
              h13odds = 4;
              h14odds = 9;
              h15odds = 37;
              h23odds = 21;
              h24odds = 49;
              h25odds = 200;
              h34odds = 2;
              h35odds = 8;
              h45odds = 19;
            break;
      
            case 16:
              h12odds = 59;
              h13odds = 5;
              h14odds = 23;
              h15odds = 18;
              h23odds = 9;
              h24odds = 42;
              h25odds = 33;
              h34odds = 4;
              h35odds = 3;
              h45odds = 14;
            break;
      
            case 17:
              h12odds = 32;
              h13odds = 44;
              h14odds = 109;
              h15odds = 25;
              h23odds = 5;
              h24odds = 12;
              h25odds = 3;
              h34odds = 17;
              h35odds = 4;
              h45odds = 10;
            break;
      
            case 18:
              h12odds = 4;
              h13odds = 8;
              h14odds = 13;
              h15odds = 5;
              h23odds = 10;
              h24odds = 16;
              h25odds = 6;
              h34odds = 33;
              h35odds = 12;
              h45odds = 20;
            break;
      
            case 19:
              h12odds = 2;
              h13odds = 7;
              h14odds = 5;
              h15odds = 8;
              h23odds = 15;
              h24odds = 11;
              h25odds = 17;
              h34odds = 38;
              h35odds = 61;
              h45odds = 43;
            break;
          
            case 20:
              h12odds = 38;
              h13odds = 2;
              h14odds = 7;
              h15odds = 24;
              h23odds = 16;
              h24odds = 60;
              h25odds = 200;
              h34odds = 3;
              h35odds = 10;
              h45odds = 37;
            break;
      
            case 21:
             h12odds = 8;
              h13odds = 161;
              h14odds = 12;
              h15odds = 24;
              h23odds = 26;
              h24odds = 2;
              h25odds = 4;
              h34odds = 40;
              h35odds = 80;
              h45odds = 6;
            break;
      
            case 22:
              h12odds = 6;
              h13odds = 12;
              h14odds = 3;
              h15odds = 36;
              h23odds = 16;
              h24odds = 4;
              h25odds = 49;
              h34odds = 8;
              h35odds = 11;
              h45odds = 24;
            break;
      
            case 23:
              h12odds = 8;
              h13odds = 29;
              h14odds = 200;
              h15odds = 9;
              h23odds = 6;
              h24odds = 42;
              h25odds = 2;
              h34odds = 159;
              h35odds = 7;
              h45odds = 47;
            break;
      
            case 24:
              h12odds = 2;
              h13odds = 47;
              h14odds = 108;
              h15odds = 18;
              h23odds = 17;
              h24odds = 6;
              h25odds = 3;
              h34odds = 20;
              h35odds = 16;
              h45odds = 19;
            break;
        
            case 25:
              h12odds = 8;
              h13odds = 43;
              h14odds = 108;
              h15odds = 18;
              h23odds = 17;
              h24odds = 6;
              h25odds = 3;
              h34odds = 20;
              h35odds = 16;
              h45odds = 19;
            break;
        
            case 26:
              h12odds = 2;
              h13odds = 8;
              h14odds = 4;
              h15odds = 15;
              h23odds = 14;
              h24odds = 7;
              h25odds = 26;
              h34odds = 29;
              h35odds = 107;
              h45odds = 88;
            break;
        
            case 27:
              h12odds = 5;
              h13odds = 7;
              h14odds = 28;
              h15odds = 14;
              h23odds = 3;
              h24odds = 12;
              h25odds = 6;
              h34odds = 16;
              h35odds = 8;
              h45odds = 33;
            break;
        
            case 28:
              h12odds = 3;
              h13odds = 19;
              h14odds = 2;
              h15odds = 21;
              h23odds = 38;
              h24odds = 4;
              h25odds = 48;
              h34odds = 9;
              h35odds = 99;
              h45odds = 24;
            break;
        
            case 29:
              h12odds = 27;
              h13odds = 9;
              h14odds = 136;
              h15odds = 13;
              h23odds = 4;
              h24odds = 61;
              h25odds = 6;
              h34odds = 20;
              h35odds = 2;
              h45odds = 3;
            break;
      
           case 30:
              h12odds = 2;
              h13odds = 7;
              h14odds = 63;
              h15odds = 12;
              h23odds = 3;
              h24odds = 26;
              h25odds = 5;
              h34odds = 21;
              h35odds = 4;
              h45odds = 36;
            break;
      
            case 31:
              h12odds = 11;
              h13odds = 14;
              h14odds = 6;
              h15odds = 43;
              h23odds = 7;
              h24odds = 3;
              h25odds = 21;
              h34odds = 4;
              h35odds = 28;
              h45odds = 12;
            break;
      
            case 32:
              h12odds = 8;
              h13odds = 86;
              h14odds = 18;
              h15odds = 17;
              h23odds = 19;
              h24odds = 3;
              h25odds = 4;
              h34odds = 30;
              h35odds = 40;
              h45odds = 6;
            break;
      
            case 33:
              h12odds = 14;
              h13odds = 29;
              h14odds = 6;
              h15odds = 109;
              h23odds = 9;
              h24odds = 2;
              h25odds = 34;
              h34odds = 4;
              h35odds = 70;
              h45odds = 15;
            break;
      
            case 34:
              h12odds = 5;
              h13odds = 9;
              h14odds = 17;
              h15odds = 16;
              h23odds = 4;
              h24odds = 8;
              h25odds = 7;
              h34odds = 14;
              h35odds = 13;
              h45odds = 25;
            break;
        }
        
        count = h23odds;
            
        if (count > 99)
        {
           // first digit over 99
            count1 = count * .01; // 123 = 1.23
            count1 = (int)count1; // 1.23 = 1
            x = 2;
          
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
           
                // second digit over 99
    
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
        }
        
        else if (count < 100 && count > 9)
        {
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
    
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
            
                // second  digit  99 - 10
           
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
            
                x = 9;
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
        }
    
        else if (count < 10)
        {
          x = 6;
    
                if (count == 0) { custom0(); }
                if (count == 1) { custom1(); }
                if (count == 2) { custom2(); }
                if (count == 3) { custom3(); }
                if (count == 4) { custom4(); }
                if (count == 5) { custom5(); }
                if (count == 6) { custom6(); }
                if (count == 7) { custom7(); }
                if (count == 8) { custom8(); }
                if (count == 9) { custom9(); }
        }
    
        count = h15odds;
        
        if (count > 99)
        {
           // first digit over 99
                
                count1 = count * .01; // 123 = 1.23
                count1 = (int)count1; // 1.23 = 1
    
                x = 2;
    
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
          
                // second digit over 99
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
              }
            else if (count < 100 && count > 9)
            {
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
            
                // second  digit  99 - 10
            
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
            
                x = 9;
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
            }
            
            else if (count < 10)
            {
                x = 6;
                if (count == 0) { custom02(); }
                if (count == 1) { custom12(); }
                if (count == 2) { custom22(); }
                if (count == 3) { custom32(); }
                if (count == 4) { custom42(); }
                if (count == 5) { custom52(); }
                if (count == 6) { custom62(); }
                if (count == 7) { custom72(); }
                if (count == 8) { custom82(); }
                if (count == 9) { custom92(); }
            }
            // display 3
            
             count = h14odds;
            
            if (count > 99)
              {
                // first digit over 99
                
                count1 = count * .01; // 123 = 1.23
                count1 = (int)count1; // 1.23 = 1
                
                x = 2;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
            
                // second digit over 99
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
              }
            else if (count < 100 && count > 9)
            {
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
            
                // second  digit  99 - 10
            
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
            
                x = 9;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
            }
            
            else if (count < 10)
            {
                x = 6;
                if (count == 0) { custom03(); }
                if (count == 1) { custom13(); }
                if (count == 2) { custom23(); }
                if (count == 3) { custom33(); }
                if (count == 4) { custom43(); }
                if (count == 5) { custom53(); }
                if (count == 6) { custom63(); }
                if (count == 7) { custom73(); }
                if (count == 8) { custom83(); }
                if (count == 9) { custom93(); }
            }
            
            
            // display 4
            
             count = h13odds;
            
            if (count > 99)
              {
                // first digit over 99
                
                count1 = count * .01; // 123 = 1.23
                count1 = (int)count1; // 1.23 = 1
                
                x = 2;
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
            
                // second digit over 99
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
              }
            else if (count < 100 && count > 9)
            {
    
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
    
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
            
                // second  digit  99 - 10
            
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
            
                x = 9;
    
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
            }
            
            else if (count < 10)
    
            {
                x = 6;
                if (count == 0) { custom04(); }
                if (count == 1) { custom14(); }
                if (count == 2) { custom24(); }
                if (count == 3) { custom34(); }
                if (count == 4) { custom44(); }
                if (count == 5) { custom54(); }
                if (count == 6) { custom64(); }
                if (count == 7) { custom74(); }
                if (count == 8) { custom84(); }
                if (count == 9) { custom94(); }
            }
            
            // display 5
            
             count = h12odds;
            
            if (count > 99)
              {
                // first digit over 99
                
                count1 = count * .01; // 123 = 1.23
                count1 = (int)count1; // 1.23 = 1
                
                x = 2;
    
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
    
            
                // second digit over 99
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
    
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
    
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
              }
    
            else if (count < 100 && count > 9)
            {
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
    
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
            
                // second  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
           
                x = 9;
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
            }
            
            else if (count < 10)
            {
                x = 6;
                if (count == 0) { custom05(); }
                if (count == 1) { custom15(); }
                if (count == 2) { custom25(); }
                if (count == 3) { custom35(); }
                if (count == 4) { custom45(); }
                if (count == 5) { custom55(); }
                if (count == 6) { custom65(); }
                if (count == 7) { custom75(); }
                if (count == 8) { custom85(); }
                if (count == 9) { custom95(); }
    
            }    
     }
       
       
     }
   
   
         



Right 5 boards

  #include 
  
  int h45odds = 0;
  int h35odds = 0;
  int h34odds = 0;
  int h25odds = 0;
  int h24odds = 0;
  
  int h12odds = 0;
  int h13odds = 0;
  int h14odds = 0;
  int h15odds = 0;
  int h23odds = 0;
  
  long lastrace = 0;
  
  long x = 0;
  long y = 0;
  
  long count = 0;
  long count1 = 0;
  
        byte LT[8] = 
        {
         B00111,
         B01111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111
        };

        byte UB[8] =
        {
         B11111,
         B11111,
         B11111,
         B00000,
         B00000,
         B00000,
         B00000,
         B00000
        };

        byte RT[8] =
        {
         B11100,
         B11110,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111
        };

        byte LL[8] =
        {
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B01111,
         B00111
        };

        byte LB[8] =
        {
         B00000,
         B00000,
         B00000,
         B00000,
         B00000,
         B11111,
         B11111,
         B11111
        };

        byte LR[8] =
        {
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11110,
         B11100
        };

        byte MB[8] =
        {
         B11111,
         B11111,
         B11111,
         B00000,
         B00000,
         B00000,
         B11111,
         B11111
        };

        byte block[8] =
        {
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111,
         B11111
        };

  LiquidCrystal horse45(23, 22, 25, 24, 27, 26);
  LiquidCrystal horse35(29, 28, 31, 30, 33, 32);
  LiquidCrystal horse34(35, 34, 37, 36, 39, 38);
  LiquidCrystal horse25(41, 40, 43, 42, 45, 44);
  LiquidCrystal horse24(47, 46, 49, 48, 51, 50);  
  
  void setup()
  {
    Serial.begin(9600);
    
         horse45.createChar(0,LT);
         horse45.createChar(1,UB);
         horse45.createChar(2,RT);
         horse45.createChar(3,LL);
         horse45.createChar(4,LB);
         horse45.createChar(5,LR);
         horse45.createChar(6,MB);
         horse45.createChar(7,block);

         horse35.createChar(0,LT);
         horse35.createChar(1,UB);
         horse35.createChar(2,RT);
         horse35.createChar(3,LL);
         horse35.createChar(4,LB);
         horse35.createChar(5,LR);
         horse35.createChar(6,MB);
         horse35.createChar(7,block);        

         horse34.createChar(0,LT);
         horse34.createChar(1,UB);
         horse34.createChar(2,RT);
         horse34.createChar(3,LL);
         horse34.createChar(4,LB);
         horse34.createChar(5,LR);
         horse34.createChar(6,MB);
         horse34.createChar(7,block);        

         horse25.createChar(0,LT);
         horse25.createChar(1,UB);
         horse25.createChar(2,RT);
         horse25.createChar(3,LL);
         horse25.createChar(4,LB);
         horse25.createChar(5,LR);
         horse25.createChar(6,MB);
         horse25.createChar(7,block);        

         horse24.createChar(0,LT);
         horse24.createChar(1,UB);
         horse24.createChar(2,RT);
         horse24.createChar(3,LL);
         horse24.createChar(4,LB);
         horse24.createChar(5,LR);
         horse24.createChar(6,MB);
         horse24.createChar(7,block);   
   
         horse45.begin(16, 2);
         horse35.begin(16, 2);
         horse34.begin(16, 2);
         horse25.begin(16, 2);
         horse24.begin(16, 2);    
      
         pinMode(8, OUTPUT);
         pinMode(9, OUTPUT);
         pinMode(10, OUTPUT);
         pinMode(11, OUTPUT);
         pinMode(12, OUTPUT);

         digitalWrite(8, HIGH);
         digitalWrite(9, HIGH);
         digitalWrite(10, HIGH);
         digitalWrite(11, HIGH);
         digitalWrite(12, HIGH);
  }

        void custom0()
        { // uses segments to build the number 0
         horse45.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse45.write(8);  // call each segment to create
         horse45.write(1);  // top half of the number
         horse45.write(2);
         horse45.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse45.write(3);  // call each segment to create
         horse45.write(4);  // bottom half of the number
         horse45.write(5);
        }
       
        void custom1()
        {
         horse45.setCursor(0+x,0);
         horse45.write(1);
         horse45.write(2);
         horse45.setCursor(0+x,1);
         horse45.write(4);
         horse45.write(7);
         horse45.write(4);
        }
        
        void custom2()
        {
         horse45.setCursor(0+x,0);
         horse45.write(6);
         horse45.write(6);
         horse45.write(2);
         horse45.setCursor(0+x, 1);
         horse45.write(3);
         horse45.write(4);
         horse45.write(4);
        }
       
        void custom3()
        {
         horse45.setCursor(0+x,0);
         horse45.write(6);
         horse45.write(6);
         horse45.write(2);
         horse45.setCursor(0+x, 1);
         horse45.write(4);
         horse45.write(4);
         horse45.write(5); 
        }
        
        void custom4()
        {
         horse45.setCursor(0+x,0);
         horse45.write(3);
         horse45.write(4);
         horse45.write(7);
         horse45.setCursor(2+x, 1);
         horse45.write(7);
        }
        
        void custom5()
        {
         horse45.setCursor(0+x,0);
         horse45.write(3);
         horse45.write(6);
         horse45.write(6);
         horse45.setCursor(0+x, 1);
         horse45.write(4);
         horse45.write(4);
         horse45.write(5);
        }
        
        void custom6()
        {
         horse45.setCursor(0+x,0);
         horse45.write(8);
         horse45.write(6);
         horse45.write(6);
         horse45.setCursor(0+x, 1);
         horse45.write(3);
         horse45.write(4);
         horse45.write(5);
        }
        
        void custom7()
        {
         horse45.setCursor(0+x,0);
         horse45.write(1);
         horse45.write(1);
         horse45.write(2);
         horse45.setCursor(2+x, 1);
         horse45.write(7);
        }
        
        void custom8()
        {
         horse45.setCursor(0+x,0);
         horse45.write(8);
         horse45.write(6);
         horse45.write(2);
         horse45.setCursor(0+x, 1);
         horse45.write(3);
         horse45.write(4);
         horse45.write(5);
        }
        
        void custom9()
        {
         horse45.setCursor(0+x,0);
         horse45.write(8);
         horse45.write(6);
         horse45.write(2);
         horse45.setCursor(2+x, 1);
         horse45.write(7);
        }
        
        // count 2
        
        void custom02()
        { // uses segments to build the number 0
         horse35.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse35.write(8);  // call each segment to create
         horse35.write(1);  // top half of the number
         horse35.write(2);
         horse35.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse35.write(3);  // call each segment to create
         horse35.write(4);  // bottom half of the number
         horse35.write(5);
        }
        
        void custom12()
        {
         horse35.setCursor(0+x,0);
         horse35.write(1);
         horse35.write(2);
         horse35.setCursor(0+x,1);
         horse35.write(4);
         horse35.write(7);
         horse35.write(4);
        }
        
        void custom22()
        {
         horse35.setCursor(0+x,0);
         horse35.write(6);
         horse35.write(6);
         horse35.write(2);
         horse35.setCursor(0+x, 1);
         horse35.write(3);
         horse35.write(4);
         horse35.write(4);
        }
        
        void custom32()
        {
         horse35.setCursor(0+x,0);
         horse35.write(6);
         horse35.write(6);
         horse35.write(2);
         horse35.setCursor(0+x, 1);
         horse35.write(4);
         horse35.write(4);
         horse35.write(5); 
        }
        
        void custom42()
        {
         horse35.setCursor(0+x,0);
         horse35.write(3);
         horse35.write(4);
         horse35.write(7);
         horse35.setCursor(2+x, 1);
         horse35.write(7);
        }
        
        void custom52()
        {
         horse35.setCursor(0+x,0);
         horse35.write(3);
         horse35.write(6);
         horse35.write(6);
         horse35.setCursor(0+x, 1);
         horse35.write(4);
         horse35.write(4);
         horse35.write(5);
        }
        
        void custom62()
        {
         horse35.setCursor(0+x,0);
         horse35.write(8);
         horse35.write(6);
         horse35.write(6);
         horse35.setCursor(0+x, 1);
         horse35.write(3);
         horse35.write(4);
         horse35.write(5);
        }
        
        void custom72()
        {
         horse35.setCursor(0+x,0);
         horse35.write(1);
         horse35.write(1);
         horse35.write(2);
         horse35.setCursor(2+x, 1);
         horse35.write(7);
        }
        
        void custom82()
        {
         horse35.setCursor(0+x,0);
         horse35.write(8);
         horse35.write(6);
         horse35.write(2);
         horse35.setCursor(0+x, 1);
         horse35.write(3);
         horse35.write(4);
         horse35.write(5);
        }
        
        void custom92()
        {
         horse35.setCursor(0+x,0);
         horse35.write(8);
         horse35.write(6);
         horse35.write(2);
         horse35.setCursor(2+x, 1);
         horse35.write(7);
        }
        
        // count 3
        
        void custom03()
        { // uses segments to build the number 0
         horse34.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse34.write(8);  // call each segment to create
         horse34.write(1);  // top half of the number
         horse34.write(2);
         horse34.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse34.write(3);  // call each segment to create
         horse34.write(4);  // bottom half of the number
         horse34.write(5);
        }
        
        void custom13()
        {
         horse34.setCursor(0+x,0);
         horse34.write(1);
         horse34.write(2);
         horse34.setCursor(0+x,1);
         horse34.write(4);
         horse34.write(7);
         horse34.write(4);
        }
        
        void custom23()
        {
         horse34.setCursor(0+x,0);
         horse34.write(6);
         horse34.write(6);
         horse34.write(2);
         horse34.setCursor(0+x, 1);
         horse34.write(3);
         horse34.write(4);
         horse34.write(4);
        }
        
        void custom33()
        {
         horse34.setCursor(0+x,0);
         horse34.write(6);
         horse34.write(6);
         horse34.write(2);
         horse34.setCursor(0+x, 1);
         horse34.write(4);
         horse34.write(4);
         horse34.write(5); 
        }
        
        void custom43()
        {
         horse34.setCursor(0+x,0);
         horse34.write(3);
         horse34.write(4);
         horse34.write(7);
         horse34.setCursor(2+x, 1);
         horse34.write(7);
        }
        
        void custom53()
        {
         horse34.setCursor(0+x,0);
         horse34.write(3);
         horse34.write(6);
         horse34.write(6);
         horse34.setCursor(0+x, 1);
         horse34.write(4);
         horse34.write(4);
         horse34.write(5);
        }

      
        void custom63()
        {
         horse34.setCursor(0+x,0);
         horse34.write(8);
         horse34.write(6);
         horse34.write(6);
         horse34.setCursor(0+x, 1);
         horse34.write(3);
         horse34.write(4);
         horse34.write(5);
        }
        
        void custom73()
        {
         horse34.setCursor(0+x,0);
         horse34.write(1);
         horse34.write(1);
         horse34.write(2);
         horse34.setCursor(2+x, 1);
         horse34.write(7);
        }
        
        void custom83()
        {
         horse34.setCursor(0+x,0);
         horse34.write(8);
         horse34.write(6);
         horse34.write(2);
         horse34.setCursor(0+x, 1);
         horse34.write(3);
         horse34.write(4);
         horse34.write(5);
        }
        
        void custom93()
        {
         horse34.setCursor(0+x,0);
         horse34.write(8);
         horse34.write(6);
         horse34.write(2);
         horse34.setCursor(2+x, 1);
         horse34.write(7);
        }
        
        // count 4
        
        void custom04()
        { // uses segments to build the number 0
         horse25.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse25.write(8);  // call each segment to create
         horse25.write(1);  // top half of the number
         horse25.write(2);
         horse25.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse25.write(3);  // call each segment to create
         horse25.write(4);  // bottom half of the number
         horse25.write(5);
        }
        
        void custom14()
        {
         horse25.setCursor(0+x,0);
         horse25.write(1);
         horse25.write(2);
         horse25.setCursor(0+x,1);
         horse25.write(4);
         horse25.write(7);
         horse25.write(4);
        }
        
        void custom24()
        {
         horse25.setCursor(0+x,0);
         horse25.write(6);
         horse25.write(6);
         horse25.write(2);
         horse25.setCursor(0+x, 1);
         horse25.write(3);
         horse25.write(4);
         horse25.write(4);
        }
        
        void custom34()
        {
         horse25.setCursor(0+x,0);
         horse25.write(6);
         horse25.write(6);
         horse25.write(2);
         horse25.setCursor(0+x, 1);
         horse25.write(4);
         horse25.write(4);
         horse25.write(5); 
        }
        
        void custom44()
        {
         horse25.setCursor(0+x,0);
         horse25.write(3);
         horse25.write(4);
         horse25.write(7);
         horse25.setCursor(2+x, 1);
         horse25.write(7);
        }
        
        void custom54()
        {
         horse25.setCursor(0+x,0);
         horse25.write(3);
         horse25.write(6);
         horse25.write(6);
         horse25.setCursor(0+x, 1);
         horse25.write(4);
         horse25.write(4);
         horse25.write(5);
        }
        
        void custom64()
        {
         horse25.setCursor(0+x,0);
         horse25.write(8);
         horse25.write(6);
         horse25.write(6);
         horse25.setCursor(0+x, 1);
         horse25.write(3);
         horse25.write(4);
         horse25.write(5);
        }
        
        void custom74()
        {
         horse25.setCursor(0+x,0);
         horse25.write(1);
         horse25.write(1);
         horse25.write(2);
         horse25.setCursor(2+x, 1);
         horse25.write(7);
        }
        
        void custom84()
        {
         horse25.setCursor(0+x,0);
         horse25.write(8);
         horse25.write(6);
         horse25.write(2);
         horse25.setCursor(0+x, 1);
         horse25.write(3);
         horse25.write(4);
         horse25.write(5);
        }
        
        void custom94()
        {
         horse25.setCursor(0+x,0);
         horse25.write(8);
         horse25.write(6);
         horse25.write(2);
         horse25.setCursor(2+x, 1);
         horse25.write(7);
        }
        
        // count 5
        
        void custom05()
        { // uses segments to build the number 0
         horse24.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
         horse24.write(8);  // call each segment to create
         horse24.write(1);  // top half of the number
         horse24.write(2);
         horse24.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
         horse24.write(3);  // call each segment to create
         horse24.write(4);  // bottom half of the number
         horse24.write(5);
        }
        
        void custom15()
        {
         horse24.setCursor(0+x,0);
         horse24.write(1);
         horse24.write(2);
         horse24.setCursor(0+x,1);
         horse24.write(4);
         horse24.write(7);
         horse24.write(4);
        }
        
        void custom25()
        {
         horse24.setCursor(0+x,0);
         horse24.write(6);
         horse24.write(6);
         horse24.write(2);
         horse24.setCursor(0+x, 1);
         horse24.write(3);
         horse24.write(4);
         horse24.write(4);
        }
        

       void custom35()
        {
         horse24.setCursor(0+x,0);
         horse24.write(6);
         horse24.write(6);
         horse24.write(2);
         horse24.setCursor(0+x, 1);
         horse24.write(4);
         horse24.write(4);
         horse24.write(5); 
        }
        
        void custom45()
        {
         horse24.setCursor(0+x,0);
         horse24.write(3);
         horse24.write(4);
         horse24.write(7);
         horse24.setCursor(2+x, 1);
         horse24.write(7);
        }
        
        void custom55()
        {
         horse24.setCursor(0+x,0);
         horse24.write(3);
         horse24.write(6);
         horse24.write(6);
         horse24.setCursor(0+x, 1);
         horse24.write(4);
         horse24.write(4);
         horse24.write(5);
        }
        
        void custom65()
        {
         horse24.setCursor(0+x,0);
         horse24.write(8);
         horse24.write(6);
         horse24.write(6);
         horse24.setCursor(0+x, 1);
         horse24.write(3);
         horse24.write(4);
         horse24.write(5);
        }
        
        void custom75()
        {
         horse24.setCursor(0+x,0);
         horse24.write(1);
         horse24.write(1);
         horse24.write(2);
         horse24.setCursor(2+x, 1);
         horse24.write(7);
        }
        
        void custom85()
        {
         horse24.setCursor(0+x,0);
         horse24.write(8);
         horse24.write(6);
         horse24.write(2);
         horse24.setCursor(0+x, 1);
         horse24.write(3);
         horse24.write(4);
         horse24.write(5);
        }
        
        void custom95()
        {
         horse24.setCursor(0+x,0);
         horse24.write(8);
         horse24.write(6);
         horse24.write(2);
         horse24.setCursor(2+x, 1);
         horse24.write(7);
        }
 
   void loop()
   {
     if (Serial.available() > 0 && Serial.available() != lastrace)
     {
       lastrace = Serial.available();
       x = Serial.parseInt();  // 12345
       y = int(x * .1);   // 1234
       y = y * 10;   // 12340
       y = x - y;   // 12345 - 12340 = 5
       
       if (y != 9)
       {
         horse45.clear();
         digitalWrite(8, LOW);
       }
       
       if (y != 8)
       {
         horse35.clear();
         digitalWrite(9, LOW);
       }
       if (y != 7)
       {
         horse34.clear();
         digitalWrite(10, LOW);
       }
       if (y != 6)
       {
         horse25.clear();
         digitalWrite(11, LOW);
       }
       if (y != 5)
       {
         horse24.clear();
         digitalWrite(12, LOW);
       }
       
       delay(4000);
       
       digitalWrite(8, HIGH);
       digitalWrite(9, HIGH);
       digitalWrite(10, HIGH);
       digitalWrite(11, HIGH);
       digitalWrite(12, HIGH);
       
       horse45.clear();
       horse35.clear();
       horse34.clear();
       horse25.clear();
       horse24.clear(); 
       
       x = int(x * .001);   // 12345 = 12
       
        switch(x)
          {
            case 10:
              h12odds = 14;
              h13odds = 9;
              h14odds = 39;
              h15odds = 5;
              h23odds = 11;
              h24odds = 47;
              h25odds = 6;
              h34odds = 23;
              h35odds = 3;
              h45odds = 12;
            break;
            
            case 11:
              h12odds = 9;
              h13odds = 21;
              h14odds = 11;
              h15odds = 36;
              h23odds = 6;
              h24odds = 3;
              h25odds = 10;
              h34odds = 7;
              h35odds = 23;
              h45odds = 12;
            break;
    
            case 12:
              h12odds = 19;
              h13odds = 3;
              h14odds = 6;
              h15odds = 25;
              h23odds = 9;
              h24odds = 18;
              h25odds = 76;
              h34odds = 4;
              h35odds = 17;
              h45odds = 34;
            break;
      
            case 13:
              h12odds = 10;
              h13odds = 7;
              h14odds = 6;
              h15odds = 4;
              h23odds = 23;
              h24odds = 20;
              h25odds = 13;
              h34odds = 14;
              h35odds = 9;
              h45odds = 8;
            break;
      
            case 14:
              h12odds = 2;
              h13odds = 34;
              h14odds = 8;
              h15odds = 5;
              h23odds = 49;
              h24odds = 12;
              h25odds = 7;
              h34odds = 200;
              h35odds = 119;
              h45odds = 29;
            break;
      
            case 15:
              h12odds = 95;
              h13odds = 4;
              h14odds = 9;
              h15odds = 37;
              h23odds = 21;
              h24odds = 49;
              h25odds = 200;
              h34odds = 2;
              h35odds = 8;
              h45odds = 19;
            break;
      
            case 16:
              h12odds = 59;
              h13odds = 5;
              h14odds = 23;
              h15odds = 18;
              h23odds = 9;
              h24odds = 42;
              h25odds = 33;
              h34odds = 4;
              h35odds = 3;
              h45odds = 14;
            break;
      
            case 17:
              h12odds = 32;
              h13odds = 44;
              h14odds = 109;
              h15odds = 25;
              h23odds = 5;
              h24odds = 12;
              h25odds = 3;
              h34odds = 17;
              h35odds = 4;
              h45odds = 10;
            break;
      
            case 18:
              h12odds = 4;
              h13odds = 8;
              h14odds = 13;
              h15odds = 5;
              h23odds = 10;
              h24odds = 16;
              h25odds = 6;
              h34odds = 33;
              h35odds = 12;
              h45odds = 20;
            break;
      
            case 19:
              h12odds = 2;
              h13odds = 7;
              h14odds = 5;
              h15odds = 8;
              h23odds = 15;
              h24odds = 11;
              h25odds = 17;
              h34odds = 38;
              h35odds = 61;
              h45odds = 43;
            break;
          
            case 20:
              h12odds = 38;
              h13odds = 2;
              h14odds = 7;
              h15odds = 24;
              h23odds = 16;
              h24odds = 60;
              h25odds = 200;
              h34odds = 3;
              h35odds = 10;
              h45odds = 37;
            break;
      
            case 21:
             h12odds = 8;
              h13odds = 161;
              h14odds = 12;
              h15odds = 24;
              h23odds = 26;
              h24odds = 2;
              h25odds = 4;
              h34odds = 40;
              h35odds = 80;
              h45odds = 6;
            break;
      
            case 22:
              h12odds = 6;
              h13odds = 12;
              h14odds = 3;
              h15odds = 36;
              h23odds = 16;
              h24odds = 4;
              h25odds = 49;
              h34odds = 8;
              h35odds = 11;
              h45odds = 24;
            break;
      
            case 23:
              h12odds = 8;
              h13odds = 29;
              h14odds = 200;
              h15odds = 9;
              h23odds = 6;
              h24odds = 42;
              h25odds = 2;
              h34odds = 159;
              h35odds = 7;
              h45odds = 47;
            break;
      
            case 24:
              h12odds = 2;
              h13odds = 47;
              h14odds = 108;
              h15odds = 18;
              h23odds = 17;
              h24odds = 6;
              h25odds = 3;
              h34odds = 20;
              h35odds = 16;
              h45odds = 19;
            break;
        
            case 25:
              h12odds = 8;
              h13odds = 43;
              h14odds = 108;
              h15odds = 18;
              h23odds = 17;
              h24odds = 6;
              h25odds = 3;
              h34odds = 20;
              h35odds = 16;
              h45odds = 19;
            break;
        
            case 26:
              h12odds = 2;
              h13odds = 8;
              h14odds = 4;
              h15odds = 15;
              h23odds = 14;
              h24odds = 7;
              h25odds = 26;
              h34odds = 29;
              h35odds = 107;
              h45odds = 88;
            break;
        
            case 27:
              h12odds = 5;
              h13odds = 7;
              h14odds = 28;
              h15odds = 14;
              h23odds = 3;
              h24odds = 12;
              h25odds = 6;
              h34odds = 16;
              h35odds = 8;
              h45odds = 33;
            break;
        
            case 28:
              h12odds = 3;
              h13odds = 19;
              h14odds = 2;
              h15odds = 21;
              h23odds = 38;
              h24odds = 4;
              h25odds = 48;
              h34odds = 9;
              h35odds = 99;
              h45odds = 24;
            break;
        
            case 29:
              h12odds = 27;
              h13odds = 9;
              h14odds = 136;
              h15odds = 13;
              h23odds = 4;
              h24odds = 61;
              h25odds = 6;
              h34odds = 20;
              h35odds = 2;
              h45odds = 3;
            break;
      
           case 30:
              h12odds = 2;
              h13odds = 7;
              h14odds = 63;
              h15odds = 12;
              h23odds = 3;
              h24odds = 26;
              h25odds = 5;
              h34odds = 21;
              h35odds = 4;
              h45odds = 36;
            break;
      
            case 31:
              h12odds = 11;
              h13odds = 14;
              h14odds = 6;
              h15odds = 43;
              h23odds = 7;
              h24odds = 3;
              h25odds = 21;
              h34odds = 4;
              h35odds = 28;
              h45odds = 12;
            break;
      
            case 32:
              h12odds = 8;
              h13odds = 86;
              h14odds = 18;
              h15odds = 17;
              h23odds = 19;
              h24odds = 3;
              h25odds = 4;
              h34odds = 30;
              h35odds = 40;
              h45odds = 6;
            break;
      
            case 33:
              h12odds = 14;
              h13odds = 29;
              h14odds = 6;
              h15odds = 109;
              h23odds = 9;
              h24odds = 2;
              h25odds = 34;
              h34odds = 4;
              h35odds = 70;
              h45odds = 15;
            break;
      
            case 34:
              h12odds = 5;
              h13odds = 9;
              h14odds = 17;
              h15odds = 16;
              h23odds = 4;
              h24odds = 8;
              h25odds = 7;
              h34odds = 14;
              h35odds = 13;
              h45odds = 25;
            break;
        }
        
        count = h45odds;
            
        if (count > 99)
        {
           // first digit over 99
            count1 = count * .01; // 123 = 1.23
            count1 = (int)count1; // 1.23 = 1
            x = 2;
          
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
           
                // second digit over 99
    
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
        }
        
        else if (count < 100 && count > 9)
        {
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
    
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
            
                // second  digit  99 - 10
           
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
            
                x = 9;
                if (count1 == 0) { custom0(); }
                if (count1 == 1) { custom1(); }
                if (count1 == 2) { custom2(); }
                if (count1 == 3) { custom3(); }
                if (count1 == 4) { custom4(); }
                if (count1 == 5) { custom5(); }
                if (count1 == 6) { custom6(); }
                if (count1 == 7) { custom7(); }
                if (count1 == 8) { custom8(); }
                if (count1 == 9) { custom9(); }
        }
    
        else if (count < 10)
        {
          x = 6;
    
                if (count == 0) { custom0(); }
                if (count == 1) { custom1(); }
                if (count == 2) { custom2(); }
                if (count == 3) { custom3(); }
                if (count == 4) { custom4(); }
                if (count == 5) { custom5(); }
                if (count == 6) { custom6(); }
                if (count == 7) { custom7(); }
                if (count == 8) { custom8(); }
                if (count == 9) { custom9(); }
        }
    
        count = h35odds;
        
        if (count > 99)
        {
           // first digit over 99
                
                count1 = count * .01; // 123 = 1.23
                count1 = (int)count1; // 1.23 = 1
    
                x = 2;
    
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
          
                // second digit over 99
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
              }
            else if (count < 100 && count > 9)
            {
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
            
                // second  digit  99 - 10
            
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
            
                x = 9;
                if (count1 == 0) { custom02(); }
                if (count1 == 1) { custom12(); }
                if (count1 == 2) { custom22(); }
                if (count1 == 3) { custom32(); }
                if (count1 == 4) { custom42(); }
                if (count1 == 5) { custom52(); }
                if (count1 == 6) { custom62(); }
                if (count1 == 7) { custom72(); }
                if (count1 == 8) { custom82(); }
                if (count1 == 9) { custom92(); }
            }
            
            else if (count < 10)
            {
                x = 6;
                if (count == 0) { custom02(); }
                if (count == 1) { custom12(); }
                if (count == 2) { custom22(); }
                if (count == 3) { custom32(); }
                if (count == 4) { custom42(); }
                if (count == 5) { custom52(); }
                if (count == 6) { custom62(); }
                if (count == 7) { custom72(); }
                if (count == 8) { custom82(); }
                if (count == 9) { custom92(); }
            }
            // display 3
            
             count = h34odds;
            
            if (count > 99)
              {
                // first digit over 99
                
                count1 = count * .01; // 123 = 1.23
                count1 = (int)count1; // 1.23 = 1
                
                x = 2;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
            
                // second digit over 99
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
              }
            else if (count < 100 && count > 9)
            {
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
            
                // second  digit  99 - 10
            
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
            
                x = 9;
                if (count1 == 0) { custom03(); }
                if (count1 == 1) { custom13(); }
                if (count1 == 2) { custom23(); }
                if (count1 == 3) { custom33(); }
                if (count1 == 4) { custom43(); }
                if (count1 == 5) { custom53(); }
                if (count1 == 6) { custom63(); }
                if (count1 == 7) { custom73(); }
                if (count1 == 8) { custom83(); }
                if (count1 == 9) { custom93(); }
            }
            
            else if (count < 10)
            {
                x = 6;
                if (count == 0) { custom03(); }
                if (count == 1) { custom13(); }
                if (count == 2) { custom23(); }
                if (count == 3) { custom33(); }
                if (count == 4) { custom43(); }
                if (count == 5) { custom53(); }
                if (count == 6) { custom63(); }
                if (count == 7) { custom73(); }
                if (count == 8) { custom83(); }
                if (count == 9) { custom93(); }
            }
            
            
            // display 4
            
             count = h25odds;
            
            if (count > 99)
              {
                // first digit over 99
                
                count1 = count * .01; // 123 = 1.23
                count1 = (int)count1; // 1.23 = 1
                
                x = 2;
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
            
                // second digit over 99
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
              }
            else if (count < 100 && count > 9)
            {
    
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
    
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
            
                // second  digit  99 - 10
            
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
            
                x = 9;
    
                if (count1 == 0) { custom04(); }
                if (count1 == 1) { custom14(); }
                if (count1 == 2) { custom24(); }
                if (count1 == 3) { custom34(); }
                if (count1 == 4) { custom44(); }
                if (count1 == 5) { custom54(); }
                if (count1 == 6) { custom64(); }
                if (count1 == 7) { custom74(); }
                if (count1 == 8) { custom84(); }
                if (count1 == 9) { custom94(); }
            }
            
            else if (count < 10)
    
            {
                x = 6;
                if (count == 0) { custom04(); }
                if (count == 1) { custom14(); }
                if (count == 2) { custom24(); }
                if (count == 3) { custom34(); }
                if (count == 4) { custom44(); }
                if (count == 5) { custom54(); }
                if (count == 6) { custom64(); }
                if (count == 7) { custom74(); }
                if (count == 8) { custom84(); }
                if (count == 9) { custom94(); }
            }
            
            // display 5
            
             count = h24odds;
            
            if (count > 99)
              {
                // first digit over 99
                
                count1 = count * .01; // 123 = 1.23
                count1 = (int)count1; // 1.23 = 1
                
                x = 2;
    
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
    
            
                // second digit over 99
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
            
                if (count1 == 20)
                {
                  count1 = 0;
                }
                else
                {
                  count1 = count1 - 10;
                }
            
                x = 6;
    
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
            
                // third digit over 99
            
                count1 = count * .1; // 123 = 12.3
                count1 = (int)count1; // 12.3 = 12
                count1 = count1 * 10; // 12 = 120
                count1 = count - count1;// 123 - 120 = 3
            
                x = 10;
    
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
              }
    
            else if (count < 100 && count > 9)
            {
                // first  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3
            
                x = 5;
    
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
            
                // second  digit  99 - 10
                count1 = count * .1; // 34 = 3.4
                count1 = (int)count1; // 3.4 = 3
                count1 = count1 * 10; // 3 = 30
                count1 = count - count1;// 34 - 30 = 4
           
                x = 9;
                if (count1 == 0) { custom05(); }
                if (count1 == 1) { custom15(); }
                if (count1 == 2) { custom25(); }
                if (count1 == 3) { custom35(); }
                if (count1 == 4) { custom45(); }
                if (count1 == 5) { custom55(); }
                if (count1 == 6) { custom65(); }
                if (count1 == 7) { custom75(); }
                if (count1 == 8) { custom85(); }
                if (count1 == 9) { custom95(); }
            }
            
            else if (count < 10)
            {
                x = 6;
                if (count == 0) { custom05(); }
                if (count == 1) { custom15(); }
                if (count == 2) { custom25(); }
                if (count == 3) { custom35(); }
                if (count == 4) { custom45(); }
                if (count == 5) { custom55(); }
                if (count == 6) { custom65(); }
                if (count == 7) { custom75(); }
                if (count == 8) { custom85(); }
                if (count == 9) { custom95(); }
    
            }    
     }
       
       
     }
   
   
         


3b - Attaching the board

I quickly go over the boards used to attach the odds board.

Video #2

3c - Countdown clock.

Go over the final code for the countdown clock.

Video #3

Countdown clock code
      #include 
      
      LiquidCrystal counter(12,11,10,9,8,7);
      int count = 30;
      int count1 = 0;
      
      int x = 0;
      
      long lastrace = 0;
      
       byte LT[8] = 
              {
               B00111,
               B01111,
               B11111,
               B11111,
               B11111,
               B11111,
               B11111,
               B11111
              };
              byte UB[8] =
              {
               B11111,
               B11111,
               B11111,
               B00000,
               B00000,
               B00000,
               B00000,
               B00000
              };
              byte RT[8] =
              {
               B11100,
               B11110,
               B11111,
               B11111,
               B11111,
               B11111,
               B11111,
               B11111
              };
              byte LL[8] =
              {
               B11111,
               B11111,
               B11111,
               B11111,
               B11111,
               B11111,
               B01111,
               B00111
              };
              byte LB[8] =
              {
               B00000,
               B00000,
               B00000,
               B00000,
               B00000,
               B11111,
               B11111,
               B11111
              };
              byte LR[8] =
              {
               B11111,
               B11111,
               B11111,
               B11111,
               B11111,
               B11111,
               B11110,
               B11100
              };
              byte MB[8] =
              {
               B11111,
               B11111,
               B11111,
               B00000,
               B00000,
               B00000,
               B11111,
               B11111
              };
              byte block[8] =
              {
               B11111,
               B11111,
               B11111,
               B11111,
               B11111,
               B11111,
               B11111,
               B11111
              };
      
      
      void setup() 
      {
        // put your setup code here, to run once:
        pinMode(13, OUTPUT);
        digitalWrite(13, LOW);
        counter.begin(16,2);
        Serial.begin(9600);
      
               counter.createChar(0,LT);
               counter.createChar(1,UB);
               counter.createChar(2,RT);
               counter.createChar(3,LL);
               counter.createChar(4,LB);
               counter.createChar(5,LR);
               counter.createChar(6,MB);
               counter.createChar(7,block);
      }
      
      void loop() 
      {
        
        if (Serial.available() > 0 && Serial.available() != lastrace)
        {
          lastrace = Serial.available();
          digitalWrite(13, HIGH);
      
          while (count > 0)
          {
            
                if (count < 100 && count > 9)
                {
      
                    // first  digit  99 - 10
                    count1 = count * .1; // 34 = 3.4
                    count1 = (int)count1; // 3
                
                    x = 5;
                    if (count1 == 0) { custom0(); }
                    if (count1 == 1) { custom1(); }
                    if (count1 == 2) { custom2(); }
                    if (count1 == 3) { custom3(); }
                    if (count1 == 4) { custom4(); }
                    if (count1 == 5) { custom5(); }
                    if (count1 == 6) { custom6(); }
                    if (count1 == 7) { custom7(); }
                    if (count1 == 8) { custom8(); }
                    if (count1 == 9) { custom9(); }
                
                    // second  digit  99 - 10
                
                    count1 = count * .1; // 34 = 3.4
                    count1 = (int)count1; // 3.4 = 3
                    count1 = count1 * 10; // 3 = 30
                    count1 = count - count1;// 34 - 30 = 4
                
                    x = 9;
                    if (count1 == 0) { custom0(); }
                    if (count1 == 1) { custom1(); }
                    if (count1 == 2) { custom2(); }
                    if (count1 == 3) { custom3(); }
                    if (count1 == 4) { custom4(); }
                    if (count1 == 5) { custom5(); }
                    if (count1 == 6) { custom6(); }
                    if (count1 == 7) { custom7(); }
                    if (count1 == 8) { custom8(); }
                    if (count1 == 9) { custom9(); }
                }
                
                else if (count < 10)
                {
                    x = 6;
                    if (count == 0) { custom0(); }
                    if (count == 1) { custom1(); }
                    if (count == 2) { custom2(); }
                    if (count == 3) { custom3(); }
                    if (count == 4) { custom4(); }
                    if (count == 5) { custom5(); }
                    if (count == 6) { custom6(); }
                    if (count == 7) { custom7(); }
                    if (count == 8) { custom8(); }
                    if (count == 9) { custom9(); }
                }
        
                    delay(1000);
                    counter.clear();
                    count--;
          }
        } 
        
        digitalWrite(13, LOW);
        delay(5000);
        count = 30;
      
      
      }
      
           void custom0()
              { // uses segments to build the number 0
               counter.setCursor(0+x,0); // set cursor to column 0, line 0 (first row)
               counter.write(8);  // call each segment to create
               counter.write(1);  // top half of the number
               counter.write(2);
               counter.setCursor(0+x, 1); // set cursor to colum 0, line 1 (second row)
               counter.write(3);  // call each segment to create
               counter.write(4);  // bottom half of the number
               counter.write(5);
              }
              
              void custom1()
              {
               counter.setCursor(0+x,0);
               counter.write(1);
               counter.write(2);
               counter.setCursor(0+x,1);
               counter.write(4);
               counter.write(7);
               counter.write(4);
              }
              
              void custom2()
              {
               counter.setCursor(0+x,0);
               counter.write(6);
               counter.write(6);
               counter.write(2);
               counter.setCursor(0+x, 1);
               counter.write(3);
               counter.write(4);
               counter.write(4);
              }
              
              void custom3()
              {
               counter.setCursor(0+x,0);
               counter.write(6);
               counter.write(6);
               counter.write(2);
               counter.setCursor(0+x, 1);
               counter.write(4);
               counter.write(4);
               counter.write(5); 
              }
              
              void custom4()
              {
               counter.setCursor(0+x,0);
               counter.write(3);
               counter.write(4);
               counter.write(7);
               counter.setCursor(2+x, 1);
               counter.write(7);
              }
              
              void custom5()
              {
               counter.setCursor(0+x,0);
               counter.write(3);
               counter.write(6);
               counter.write(6);
               counter.setCursor(0+x, 1);
               counter.write(4);
               counter.write(4);
               counter.write(5);
              }
              
              void custom6()
              {
               counter.setCursor(0+x,0);
               counter.write(8);
               counter.write(6);
               counter.write(6);
               counter.setCursor(0+x, 1);
               counter.write(3);
               counter.write(4);
               counter.write(5);
              }
              
              void custom7()
              {
               counter.setCursor(0+x,0);
               counter.write(1);
               counter.write(1);
               counter.write(2);
               counter.setCursor(2+x, 1);
               counter.write(7);
              }
              
              void custom8()
              {
               counter.setCursor(0+x,0);
               counter.write(8);
               counter.write(6);
               counter.write(2);
               counter.setCursor(0+x, 1);
               counter.write(3);
               counter.write(4);
               counter.write(5);
              }
              
              void custom9()
              {
               counter.setCursor(0+x,0);
               counter.write(8);
               counter.write(6);
               counter.write(2);
               counter.setCursor(2+x, 1);
               counter.write(7);
              }