Autonomous brushless car controlled by Android over bluetooth

Hello everybody!
I am a 4th year mecanics - robotics student and am taking part in a competition.
The goal is to build a robot/car that drives itself through a maze and stops at the finish line(metal line).
Also it has to have a remote from where you can control it and display speed, battery, distance travelled and robot direction.
Until now this is what we have:
Arduino Uno with HC-06 BT module.
3 Parallax ping sensors ( 2 for front distance and one for lift protection)
Metal detector(works ok)
Android phone for remote with App Inventor 2 app on it.

I managed to get the remote to work but i can only send commands to it, unable to receive from arduino.
Attached is the AppInventor 2 app with the blocks.

And the Arduino code as txt because its longer than 9500characters.

Arduino code.txt (11.8 KB)