Motor and Reflectance sensor doesn't work together Maze Solver

Hi
I am new in arduino projects, so pardon me if my question is too silly.
Recently I have started building a maze solver robot. The components I have used are:

  1. Arduino Uno
  2. Adafruit Motor/Stepper/Servo Shield v1.2
  3. Pololu QTR-8A reflectance sensor array
  4. Generic rc car with motors (maybe 120rpm, not so sure).

If I upload a sample sketch to test motors, it works fine. If I use sample sketch to test if reflectance sensor works, I get the values on the serial monitor alright. But if I put even a single command of motor run in a combined sketch, it doesn’t work. Is there any problem in my code? or is my arduino in bad health?

N.B. sketches named “MotorTest” and “QTRAExamplesfor4sensors” work fine. But test2 doesn’t work. The serial reading stops after first line of sensor values

MotorTest.ino (1.11 KB)

QTRAExamplefor4sensors.ino (3.97 KB)

test2.ino (4.22 KB)