Serial Monitor not displaying result

Hi, I am relatively new to arduino, having to do it for my final year project. I am tasked to connect my 7 segment from a radar kit to arduino uno (note that this only the segments are connected to the arduino). When connected, it is to display the speed detected by the radar kit. But I’m having some trouble getting the output on my serial monitor.

The code is the following:

int segPins[] = {0, 1, 2, 3, 4, 5, 6 };   // { a b c d e f g  ) of ten's position

int measuredSpeed, oldSpeed, maxspeed, minspeed,avgspeed ;//converted data to speed

void setup() {
 Serial.begin(115200);//for debugging

 // define pin modes
pinMode(0,INPUT); //a of ten's position 7 segment
pinMode(1,INPUT); //b of ten's position 7 segment
pinMode(2,INPUT); //c of ten's position 7 segment
pinMode(3,INPUT); //d of ten's position 7 segment
pinMode(4,INPUT); //e of ten's position 7 segment
pinMode(5,INPUT); //f of ten's position 7 segment
pinMode(6,INPUT); //g of ten's position 7 segment
pinMode(7,INPUT); //a of one's position 7 segment
pinMode(8,INPUT); //b of one's position 7 segment
pinMode(9,INPUT); //c of one's position 7 segment
pinMode(10,INPUT); //d of one's position 7 segment
pinMode(11,INPUT); //e of one's position 7 segment
pinMode(12,INPUT); //f of one's position 7 segment
pinMode(13,INPUT); //g of one's position 7 segment
}

void loop() {
  delay(1000);// update rate
  unsigned long scanTimeStart = millis();//timeout for scanning 7segment

  while (millis() - scanTimeStart < 100) //jump in and scan the 7segment!
  {
   
  }
   measuredSpeed = 0;//clear the speed, and we'll set it now based on the segment data

 /*
  *  ONES POSITION
  */
//0 - ones
if(digitalRead(7)== LOW && digitalRead(8)== LOW && digitalRead(9)== LOW && digitalRead(10)== LOW && digitalRead(11)== LOW && digitalRead(12)== LOW && digitalRead(13)== HIGH)
{measuredSpeed = 0;}
//1 - ones
if(digitalRead(7)== HIGH && digitalRead(8)== LOW && digitalRead(9)== LOW && digitalRead(10)== HIGH && digitalRead(11)== HIGH && digitalRead(12)== HIGH && digitalRead(13)== HIGH)
{measuredSpeed = 1;}
//2 - ones
if(digitalRead(7)== LOW && digitalRead(8)== LOW && digitalRead(9)== HIGH && digitalRead(10)== LOW && digitalRead(11)== LOW && digitalRead(12)== HIGH && digitalRead(13)== LOW)
{measuredSpeed = 2;}
//3 - ones
if(digitalRead(7)== LOW && digitalRead(8)== LOW && digitalRead(9)== LOW && digitalRead(10)== LOW && digitalRead(11)== HIGH && digitalRead(12)== HIGH && digitalRead(13)== LOW)
{measuredSpeed = 3;}
//4 - ones
if(digitalRead(7)== HIGH && digitalRead(8)== LOW && digitalRead(9)== LOW && digitalRead(10)== HIGH && digitalRead(11)== HIGH && digitalRead(12)== LOW && digitalRead(13)== LOW)
{measuredSpeed = 4;}
//5 - ones
if(digitalRead(7)== LOW && digitalRead(8)== HIGH && digitalRead(9)== LOW && digitalRead(10)== LOW && digitalRead(11)== HIGH && digitalRead(12)== LOW && digitalRead(13)== LOW)
{measuredSpeed = 5;}
//6 - ones
if(digitalRead(7)== LOW && digitalRead(8)== HIGH && digitalRead(9)== LOW && digitalRead(10)== LOW && digitalRead(11)== LOW && digitalRead(12)== LOW && digitalRead(13)== LOW)
{measuredSpeed = 6;}
//7 - ones
if(digitalRead(7)== LOW && digitalRead(8)== LOW && digitalRead(9)== LOW && digitalRead(10)== HIGH && digitalRead(11)== HIGH && digitalRead(12)== HIGH && digitalRead(13)== HIGH)
{measuredSpeed = 7;}
//8 - ones
if(digitalRead(7)== LOW && digitalRead(8)== LOW && digitalRead(9)== LOW && digitalRead(10)== LOW && digitalRead(11)== LOW && digitalRead(12)== LOW && digitalRead(13)== LOW)
{measuredSpeed = 8;}
//9 - ones
if(digitalRead(7)== LOW && digitalRead(8)== LOW && digitalRead(9)== LOW && digitalRead(10)== HIGH && digitalRead(11)== HIGH && digitalRead(12)== LOW && digitalRead(13)== LOW)
{measuredSpeed = 9;}

 /*
  *  TENS POSITION
  */
//0 - tens
if(digitalRead(0)== LOW && digitalRead(1)== LOW && digitalRead(2)== LOW && digitalRead(3)== LOW && digitalRead(4)== LOW && digitalRead(5)== LOW && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (0 * 10);}
//1 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== LOW && digitalRead(2)== LOW && digitalRead(3)== HIGH && digitalRead(4)== HIGH && digitalRead(5)== HIGH && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (1 * 10);}
//2 - tens
if(digitalRead(0)== LOW && digitalRead(1)== LOW && digitalRead(2)== HIGH && digitalRead(3)== LOW && digitalRead(4)== LOW && digitalRead(5)== HIGH && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (2 * 10);}
//3 - tens
if(digitalRead(0)== LOW && digitalRead(1)== LOW && digitalRead(2)== LOW && digitalRead(3)== LOW && digitalRead(4)== HIGH && digitalRead(5)== HIGH && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (3 * 10);}
//4 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== LOW && digitalRead(2)== LOW && digitalRead(3)== HIGH && digitalRead(4)== HIGH && digitalRead(5)== LOW && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (4 * 10);}
//5 - tens
if(digitalRead(0)== LOW && digitalRead(1)== HIGH && digitalRead(2)== LOW && digitalRead(3)== LOW && digitalRead(4)== HIGH && digitalRead(5)== LOW && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (5 * 10);}
//6 - tens
if(digitalRead(0)== LOW && digitalRead(1)== HIGH && digitalRead(2)== LOW && digitalRead(3)== LOW && digitalRead(4)== LOW && digitalRead(5)== LOW && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (6 * 10);}
//7 - tens
if(digitalRead(0)== LOW && digitalRead(1)== LOW && digitalRead(2)== LOW && digitalRead(3)== HIGH && digitalRead(4)== HIGH && digitalRead(5)== HIGH && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (7 * 10);}
//8 - tens
if(digitalRead(0)== LOW && digitalRead(1)== LOW && digitalRead(2)== LOW && digitalRead(3)== LOW && digitalRead(4)== LOW && digitalRead(5)== LOW && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (8 * 10);}
//9 - tens
if(digitalRead(0)== LOW && digitalRead(1)== LOW && digitalRead(2)== LOW && digitalRead(3)== HIGH && digitalRead(4)== HIGH && digitalRead(5)== LOW && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (9 * 10);}

/*
  *  TENS POSITION
  
//0 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== HIGH && digitalRead(2)== HIGH && digitalRead(3)== HIGH && digitalRead(4)== HIGH && digitalRead(5)== HIGH && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (0 * 10);}
//1 - tens
if(digitalRead(0)== LOW && digitalRead(1)== HIGH && digitalRead(2)== HIGH && digitalRead(3)== LOW && digitalRead(4)== LOW && digitalRead(5)== LOW && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (1 * 10);}
//2 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== HIGH && digitalRead(2)== LOW && digitalRead(3)== HIGH && digitalRead(4)== HIGH && digitalRead(5)== LOW && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (2 * 10);}
//3 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== HIGH && digitalRead(2)== HIGH && digitalRead(3)== HIGH && digitalRead(4)== LOW && digitalRead(5)== LOW && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (3 * 10);}
//4 - tens
if(digitalRead(0)== LOW && digitalRead(1)== HIGH && digitalRead(2)== HIGH && digitalRead(3)== LOW && digitalRead(4)== LOW && digitalRead(5)== HIGH && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (4 * 10);}
//5 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== LOW && digitalRead(2)== HIGH && digitalRead(3)== HIGH && digitalRead(4)== LOW && digitalRead(5)== HIGH && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (5 * 10);}
//6 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== LOW && digitalRead(2)== HIGH && digitalRead(3)== HIGH && digitalRead(4)== HIGH && digitalRead(5)== HIGH && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (6 * 10);}
//7 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== HIGH && digitalRead(2)== HIGH && digitalRead(3)== LOW && digitalRead(4)== LOW && digitalRead(5)== LOW && digitalRead(6)== LOW)
{measuredSpeed = measuredSpeed + (7 * 10);}
//8 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== HIGH && digitalRead(2)== HIGH && digitalRead(3)== HIGH && digitalRead(4)== HIGH && digitalRead(5)== HIGH && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (8 * 10);}
//9 - tens
if(digitalRead(0)== HIGH && digitalRead(1)== HIGH && digitalRead(2)== HIGH && digitalRead(3)== LOW && digitalRead(4)== LOW && digitalRead(5)== HIGH && digitalRead(6)== HIGH)
{measuredSpeed = measuredSpeed + (9 * 10);}
*/
if (oldSpeed != measuredSpeed) //only print speed if it's new
   {
   Serial.print("Speed");
   Serial.print(measuredSpeed);
   Serial.println(" km");
 }
 }

The second set of tens position allows me to get the serial monitor output but it is the HIGH LOW are inverted, giving the wrong results. What is wrong with my coding other than the point 0, as I do not have extra pins to connect it to. ``

Without looking any further…

  delay(1000);// update rate
   unsigned long scanTimeStart = millis();//timeout for scanning 7segment

   while (millis() - scanTimeStart < 100) //jump in and scan the 7segment!
   {

You are resetting scanTimeStart immediately before testing it… (every loop)
Also as indicated above, please use the </> code tag in the menu to embed your code in the forum.

And AVOID delay() as the first lesson in decent coding, or you’ll regret it later!

Please modify your post and use the code button </>

so your code looks like this

and is easy to copy to a text editor. See How to use the Forum Your code is too long for me to study quickly without copying to a text editor.

There seems to be an awful lot of repetition in your program which is a recipe for typing errors - I suspect it could be made much shorter.

…R

Which pins uses your board for serial communication? Usualy it's 0 and 1, but you use them in your sketch.