I am having problems with my robot not seeing the white lines on the Mini-sumo arena

#include <xmotion.h>
////
int LeftSensor = 1; // Opponent Sensors D1, D2, D4, A4, A5
int LefttDiagonalSensor = 2;
int MiddleSensor = 4;
int RightDiagonalSensor = A4;
int RightSensor = A5;
//
//
int LeftLineSensor = 0; // Line Sensors D0 & A1
int RightLineSensor = A1;
////
int Remember=5; // Remember Variable (NOT PIN NUMBER!)
//
//
int led1 = 8; // User Led D8
//// //dipswitchler//
int switch1 = 5; // Dipswitches (D5, D6, D7)
int switch2 = 6;
int switch3 = 7;
//
//
int start = 10; // Microstart Input D10
//
*******************//
void setup() {
xmotion.StopMotors(100);
xmotion.ToggleLeds(100);
pinMode(LeftSensor, INPUT);
pinMode(LefttDiagonalSensor, INPUT);
pinMode(MiddleSensor, INPUT);
pinMode(RightDiagonalSensor, INPUT);
pinMode(RightSensor, INPUT);
pinMode(RightLineSensor, INPUT);
pinMode(LeftLineSensor, INPUT);
pinMode(switch1, INPUT);
pinMode(switch2, INPUT);
pinMode(switch3, INPUT);
digitalWrite(switch1, HIGH);
digitalWrite(switch2, HIGH);
digitalWrite(switch3, HIGH);
digitalWrite(LefttDiagonalSensor, HIGH);
digitalWrite(MiddleSensor, HIGH);
digitalWrite(RightDiagonalSensor, HIGH);
Serial.begin(3600);

}
void NoSensorRead() {
while (digitalRead(start) == 1)
{
if (digitalRead(MiddleSensor) == 1)
{
xmotion.Forward(100, 1);
Remember = 0;

} else if (digitalRead(LeftSensor) == 1)     {
  xmotion.Left0(50, 1);         
   Remember = 2;                

} else if (digitalRead(RightSensor) == 1) 
{
  xmotion.Right0(50, 1);           
   Remember = 1;                   
}
else if (digitalRead(LefttDiagonalSensor) == 1)    {
   xmotion.ArcTurn(10, 70, 1);                        
   Remember = 2;                                     
}
else if (digitalRead(RightDiagonalSensor) == 1)         
{
   xmotion.ArcTurn(70, 10, 1);                       
   Remember = 1;                                      
}

else if (digitalRead(LeftLineSensor) == 0 && digitalRead(RightLineSensor) == 1)
{
xmotion.Backward(80, 20);
xmotion.Right0(50, 30);
}

else if (digitalRead(RightLineSensor) == 0 && digitalRead(LeftLineSensor) == 1)
{
xmotion.Backward(80, 20);
xmotion.Left0(50, 30);
}

else if (digitalRead(RightLineSensor) == 0 && digitalRead(LeftLineSensor) == 0) // Both Line Sensor See Line.
{
   xmotion.Backward(80, 50); 
    xmotion.Left0(50, 80); 
}

/* 
 *  OPEN This Section for Moving Robot Otherwise it will only work
 *  When opponent seen.
 *  else if (Remember == 0)
{
   xmotion.Forward(100,1);
   
}

else if (Remember == 1)
{
xmotion.Right0(50, 1);

}
else if (Remember == 2)
{
   xmotion.Left0(50, 1);
}*/

else if (digitalRead(RightSensor) == 0 || digitalRead(RightDiagonalSensor) == 0 || digitalRead(MiddleSensor) == 0 || digitalRead(LefttDiagonalSensor) == 0 || digitalRead(LeftSensor) == 0) 
{
  xmotion.StopMotors(1); 

}

}
while (digitalRead(start) == 0)
{
xmotion.StopMotors(1);
}
}

void loop() {

/* DEBUG Section
Serial.print(digitalRead(LeftSensor));
Serial.print(digitalRead(LefttDiagonalSensor));
Serial.print(digitalRead(MiddleSensor));
Serial.print(digitalRead(RightDiagonalSensor));
Serial.println(digitalRead(RightSensor));
delay(100);
*/
while (digitalRead(start) == 1)

// TACTICS

{
if (digitalRead(switch1) == 0 && digitalRead(switch2) == 1 && digitalRead(switch3) == 1)  // Turn Left & Wait
{   
 xmotion.Left0(80,60);
 }
 else if (digitalRead(switch1) == 1 && digitalRead(switch2) == 0 && digitalRead(switch3) == 1)// Forward Attack
 {
  
    xmotion.Forward(100,50);
     xmotion.StopMotors(10);

 }
  else if (digitalRead(switch1) == 1 && digitalRead(switch2) == 1 && digitalRead(switch3) == 0)  //Turn Right
 {
    xmotion.Right0(80,60);
 
   //xmotion.Forward(100,50);
 }
 else if (digitalRead(switch1) == 0 && digitalRead(switch2) == 0 && digitalRead(switch3) == 1) // Left Zigzag
 {
 xmotion.Left0(80,40);

  xmotion.Forward(80,50);
        xmotion.StopMotors(20);
 xmotion.Right0(80,70);
 xmotion.StopMotors(20);
 xmotion.Forward(100,40);
  xmotion.StopMotors(10);

 }
 else if (digitalRead(switch1) == 0 && digitalRead(switch2) == 1 && digitalRead(switch3) == 0) // 180 degree U Turn
 {
  xmotion.Right0(100,80);
   xmotion.StopMotors(10);
 }
 else if (digitalRead(switch1) == 1 && digitalRead(switch2) == 0 && digitalRead(switch3) == 0) // Right Zigzag
 {
   xmotion.Right0(80,40);
  xmotion.StopMotors(20);
  xmotion.Forward(100,60);
        xmotion.StopMotors(20);
 xmotion.Left0(80,110);
 xmotion.Forward(100,50);
   xmotion.StopMotors(10);
 }
  else if (digitalRead(switch1) == 0 && digitalRead(switch2) == 0 && digitalRead(switch3) == 0) // Right Arc Turn
{ xmotion.ArcTurn(40,90,120);
    xmotion.Backward(100,2);
   xmotion.Left0(80,40);
   xmotion.Backward(100,1);
 }
  else if (digitalRead(switch1) == 1 && digitalRead(switch2) == 1 && digitalRead(switch3) == 1) // Left Arc Turn
 {
 xmotion.ArcTurn(90,40,120);
    xmotion.Backward(100,2);
   xmotion.Right0(80,40);
   xmotion.Backward(100,1);
   
 }
 NoSensorRead();
 }

}

Edit post#1 and put code in code tags, please.

Post schematic. Post images of the project.

Describe what be the sensors? Are they line follower sensors attuned to a color? Are they some Infared led blasting light onto the roadbed? What be the sensors?

Don't delete your post again, please. I had 2 paragraphs of what the variable Remember is and that all went to poo! when you deleted the other post.

Try here

sorry I made an another post containing images.Also I didnt delete anything maybe mods did
Line sensors are allerted when they see sth other than black,sensors are ML1

Read the forum guidelines to see how to properly post code and some good information on making a good post.
Use the IDE autoformat tool (ctrl-t or Tools, Auto format) before posting code in code tags.

Cross posting is against the rules.

Your other topic on the same subject deleted.

Please do not duplicate your questions as doing so wastes the time and effort of the volunteers trying to help you as they are then answering the same thing in different places.

Repeated duplicate posting could result in a temporary or permanent ban from the forum.

Could you take a few moments to Learn How To Use The Forum

It will help you get the best out of the forum in the future.

Thank you.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.