Analysis on the Code
Define the pin number
#define EN1 5//pin for run the left motor
#define IN1 12//pin for control left motor direction
#define EN2 6//pin for run the right motor
#define IN2 7//pin for control right motor direction
Read each analog pin
for(i=0;i<5;i++)
{
data[i]=analogRead(i);//store every value in the array
}
Motor control function
void Motor(int M1_DIR,int M1_EN,int M2_DIR,int M2_EN)
Turn right function
Motor(Forward,0,Forward,110);//turn right