Arduino uno (4tronix initio) bluetooth car not working.

Hi, this is the code that I am using:

char dataIn = 'S';        //Character/Data coming from the phone.
int pinForwardBack = 13;     //Pin that controls the car's Forward-Back motor.
int pinLeftRight = 12;       //Pin that controls the car's Left-Right motor.
int pinBrakeLeftRight = 9;  //Pin that enables/disables Left-Right motor.
int pinBrakeForwardBack = 8;  //Pin that enables/disables Forward-Back motor.
int pinLeftRightSpeed = 3;    //Pin that sets the speed for the Left-Right motor.
int pinForwardBackSpeed = 11;  //Pin that sets the speed for the Forward-Back motor.
int pinfrontLights = 4;    //Pin that activates the Front lights.
int pinbackLights = 7;    //Pin that activates the Back lights.
char determinant;         //Used in the check function, stores the character received from the phone.
char det;                 //Used in the loop function, stores the character received from the phone.
int velocity = 0;    //Stores the speed based on the character sent by the phone.

void setup() 
{       
//*************NOTE: If using Bluetooth Mate Silver use 115200 btu
//                   If using MDFLY Bluetooth Module use 9600 btu
Serial.begin(115200);  //Initialize serial communication with Bluetooth module at 115200 btu.
pinMode(pinForwardBack, OUTPUT);
pinMode(pinLeftRight, OUTPUT);
pinMode(pinBrakeLeftRight, OUTPUT);
pinMode(pinBrakeForwardBack, OUTPUT);
pinMode(pinLeftRightSpeed , OUTPUT);
pinMode(pinForwardBackSpeed , OUTPUT);
pinMode(pinfrontLights , OUTPUT);
pinMode(pinbackLights , OUTPUT);
}

void loop()
{ 
    det = check();
      while (det == 'F')   //if incoming data is a F, move forward
      {     
          digitalWrite(pinForwardBack, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,0);  //To make the Left/Right Motor not move, you just need to make its speed 0.    
          det = check();          
      }  
      while (det == 'B')   //if incoming data is a B, move back
      {    
          digitalWrite(pinForwardBack, HIGH); 
          digitalWrite(pinBrakeForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,velocity); 
          analogWrite(pinLeftRightSpeed,0);         
          det = check();          
      } 

      while (det == 'L')   //if incoming data is a L, move wheels left
      {     
          digitalWrite(pinLeftRight, HIGH);
          digitalWrite(pinBrakeLeftRight, LOW);
          digitalWrite(pinForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,0);    //To make the Forward/Back Motor not move, you just need to make its speed 0.
          analogWrite(pinLeftRightSpeed,255);        
          det = check();          
      }  
      while (det == 'R')   //if incoming data is a R, move wheels right
      {    
          digitalWrite(pinLeftRight, LOW);
          digitalWrite(pinBrakeLeftRight, LOW);
          digitalWrite(pinForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,0);
          analogWrite(pinLeftRightSpeed,255);         
          det = check();          
      }
     
      while (det == 'I')   //if incoming data is a I, turn right forward
      {     
          digitalWrite(pinLeftRight, LOW);
          digitalWrite(pinForwardBack, LOW);          
          digitalWrite(pinBrakeLeftRight, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW);  
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,255);                  
          det = check();          
      }  
      while (det == 'J')   //if incoming data is a J, turn right back
      {      
          digitalWrite(pinLeftRight, LOW);
          digitalWrite(pinForwardBack, HIGH);         
          digitalWrite(pinBrakeLeftRight, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,255);          
          det = check();          
      }          
      while (det == 'G')   //if incoming data is a G, turn left forward
      { 
          digitalWrite(pinLeftRight, HIGH);       
          digitalWrite(pinForwardBack, LOW);
          digitalWrite(pinBrakeLeftRight, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW); 
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,255);          
          det = check();          
      }    
      while (det == 'H')   //if incoming data is a H, turn left back
      {
          digitalWrite(pinLeftRight, HIGH);
          digitalWrite(pinForwardBack, HIGH); 
          digitalWrite(pinBrakeLeftRight, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,255);          
          det = check();                                              
      }   
      while (det == 'S')   //if incoming data is a S, stop
      {
          digitalWrite(pinForwardBack, LOW); 
          digitalWrite(pinLeftRight, LOW);
          analogWrite(pinForwardBackSpeed,0);
          analogWrite(pinLeftRightSpeed,0);          
          det = check(); 
      }
      while (det == 'U')   //if incoming data is a U, turn ON front lights
      {
          digitalWrite(pinfrontLights, HIGH);          
          det = check(); 
      }
      while (det == 'u')   //if incoming data is a u, turn OFF front lights
      {
          digitalWrite(pinfrontLights, LOW);          
          det = check(); 
      }
      while (det == 'W')   //if incoming data is a W, turn ON back lights
      {
          digitalWrite(pinbackLights, HIGH);          
          det = check(); 
      }
      while (det == 'w')   //if incoming data is a w, turn OFF back lights
      {
          digitalWrite(pinbackLights, LOW);
          det = check(); 
      }
}

int check()
{
  if (Serial.available() > 0)    //Check for data on the serial lines.
  {   
    dataIn = Serial.read();  //Get the character sent by the phone and store it in 'dataIn'.
        if (dataIn == 'F')
        {     
          determinant = 'F';
        }  
        else if (dataIn == 'B')
        { 
          determinant = 'B'; 
        }
        else if (dataIn == 'L')  
        { 
          determinant = 'L';
        }
        else if (dataIn == 'R')  
        { 
          determinant = 'R';
        } 
        else if (dataIn == 'I')  
        { 
          determinant = 'I'; 
        }  
        else if (dataIn == 'J')  
        {  
          determinant = 'J';
        }          
        else if (dataIn == 'G') 
        {
          determinant = 'G'; 
        }    
        else if (dataIn == 'H')  
        {
          determinant = 'H'; 
        }   
        else if (dataIn == 'S') 
        {
          determinant = 'S';
        }
        else if (dataIn == '0') 
        {
          velocity = 0;    //"velocity" does not need to be returned.
        }
        else if (dataIn == '1') 
        {
          velocity = 25;
        }
        else if (dataIn == '2') 
        {
          velocity = 50;
        }
        else if (dataIn == '3') 
        {
          velocity = 75;
        }
        else if (dataIn == '4') 
        {
          velocity = 100;
        }
        else if (dataIn == '5') 
        {
          velocity = 125;
        }
        else if (dataIn == '6') 
        {
          velocity = 150;
        }
        else if (dataIn == '7') 
        {
          velocity = 175;
        }
        else if (dataIn == '8') 
        {
          velocity = 200;
        }
        else if (dataIn == '9') 
        {
          velocity = 225;
        }
        else if (dataIn == 'q') 
        {
          velocity = 255;
        }
        else if (dataIn == 'U') 
        {
          determinant = 'U';
        }
        else if (dataIn == 'u') 
        {
          determinant = 'u';
        }
        else if (dataIn == 'W') 
        {
          determinant = 'W';
        }
       
        else if (dataIn == 'w') 
        {
          determinant = 'w';
        }
  }
return determinant;
}

The problem I seem to be having is that, when using this code, the bluetooth shield does not search for or connect to my android phone. The problem is not with the bluetooth shield as it connects to my phone easily using another code.

Any suggestions?

P.S. I have also experimented with this code (see hyperlink) but have encountered the same problem. BennyBlue | RobotShop Community

shahidzain67:
as it connects to my phone easily using another code.

And you didn't think it would be a good idea to share the working code for comparison?

:cold_sweat:

here is the basic bluetooth slave code:

/*
BluetoothShield Demo Code Slave.pde. This sketch could be used with
Master.pde to establish connection between two Arduino. It can also
be used for one slave bluetooth connected by the device(PC/Smart Phone)
with bluetooth function.
2011 Copyright (c) Seeed Technology Inc.  All right reserved.
 
Author: Steve Chang
 
This demo code is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
 
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
Lesser General Public License for more details.
 
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
For more details about the product please check http://www.seeedstudio.com/depot/
 
*/
 
 
/* Upload this sketch into Seeeduino and press reset*/
#include <SoftwareSerial.h>
#include <NewSoftSerial.h>   //Software Serial Port
#define RxD 6
#define TxD 7
 
#define DEBUG_ENABLED  1
 
SoftwareSerial blueToothSerial(RxD,TxD);
 
void setup() 
{ 
  Serial.begin(9600);
  pinMode(RxD, INPUT);
  pinMode(TxD, OUTPUT);
  setupBlueToothConnection();
 
} 
 
void loop() 
{ 
  char recvChar;
  while(1){
    if(blueToothSerial.available()){//check if there's any data sent from the remote bluetooth shield
      recvChar = blueToothSerial.read();
      Serial.print(recvChar);
    }
    if(Serial.available()){//check if there's any data sent from the local serial terminal, you can add the other applications here
      recvChar  = Serial.read();
      blueToothSerial.print(recvChar);
    }
  }
} 
 
void setupBlueToothConnection()
{
  blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
  blueToothSerial.print("\r\n+STWMOD=0\r\n"); //set the bluetooth work in slave mode
  blueToothSerial.print("\r\n+STNA=SeeedBTSlave\r\n"); //set the bluetooth name as "SeeedBTSlave"
  blueToothSerial.print("\r\n+STOAUT=1\r\n"); // Permit Paired device to connect me
  blueToothSerial.print("\r\n+STAUTO=0\r\n"); // Auto-connection should be forbidden here
  delay(2000); // This delay is required.
  blueToothSerial.print("\r\n+INQ=1\r\n"); //make the slave bluetooth inquirable 
  Serial.println("The slave bluetooth is inquirable!");
  delay(2000); // This delay is required.
  blueToothSerial.flush();
}
  setupBlueToothConnection();

Seems like this function might have something to do with connecting the Bluetooth...

Yes but can you tell me why, when I'm using the first code the bluetooth shield does not connect to my phone? And also, i have already tried to incorporate the slave code into the other code, but all that happened was the car would spin around in circles continuously.

shahidzain67:
Yes but can you tell me why, when I'm using the first code the bluetooth shield does not connect to my phone?

Because you never tell it to? Nothing in the first code says "connect to this bluetooth device". Have you looked at the Master.pde code that the Slave.pde code alludes to? It seems like that would hold the key to using the Bluetooth shield as a master.

Right, so I have placed the bluetooth master code into the initial code. Still have some probelms like:
‘check was not declared in this scope’,
'RC_Car_with_lights.ino: In function ‘void loop()’,
'RC_Car_3_with_Lights:245: error: 'a function-definition is not allowed here before ‘{’ token,
RC_Car_3_with_Lights375: error: expected ‘}’ at end of input.

Here is the code (its broken into two posts because it exceeds the word limit):

#include <SoftwareSerial.h>

char dataIn = 'S';        //Character/Data coming from the phone.
int pinForwardBack = 13;     //Pin that controls the car's Forward-Back motor.
int pinLeftRight = 12;       //Pin that controls the car's Left-Right motor.
int pinBrakeLeftRight = 9;  //Pin that enables/disables Left-Right motor.
int pinBrakeForwardBack = 8;  //Pin that enables/disables Forward-Back motor.
int pinLeftRightSpeed = 3;    //Pin that sets the speed for the Left-Right motor.
int pinForwardBackSpeed = 11;  //Pin that sets the speed for the Forward-Back motor.
int pinfrontLights = 4;    //Pin that activates the Front lights.
int pinbackLights = 7;    //Pin that activates the Back lights.
char determinant;         //Used in the check function, stores the character received from the phone.
char det;                 //Used in the loop function, stores the character received from the phone.
int velocity = 0;    //Stores the speed based on the character sent by the phone.
#include <NewSoftSerial.h>   //Software Serial Port
#define RxD 6
#define TxD 7
 
#define DEBUG_ENABLED  1

String retSymb = "+RTINQ=";//start symble when there's any return
String slaveName = ";SeeedBTSlave";// caution that ';'must be included, and make sure the slave name is right.
int nameIndex = 0;
int addrIndex = 0;

String recvBuf;
String slaveAddr;

String connectCmd = "\r\n+CONN=";

SoftwareSerial blueToothSerial(RxD,TxD);


void setup() 
{       
//*************NOTE: If using Bluetooth Mate Silver use 115200 btu
//                   If using MDFLY Bluetooth Module use 9600 btu
Serial.begin(38400);  //Initialize serial communication with Bluetooth module at 115200 btu.
  pinMode(RxD, INPUT);
  pinMode(TxD, OUTPUT);
  setupBlueToothConnection();
  //wait 1s and flush the serial buffer
  delay(1000);
  Serial.flush();
  blueToothSerial.flush();
pinMode(pinForwardBack, OUTPUT);
pinMode(pinLeftRight, OUTPUT);
pinMode(pinBrakeLeftRight, OUTPUT);
pinMode(pinBrakeForwardBack, OUTPUT);
pinMode(pinLeftRightSpeed , OUTPUT);
pinMode(pinForwardBackSpeed , OUTPUT);
pinMode(pinfrontLights , OUTPUT);
pinMode(pinbackLights , OUTPUT);
}

void setupBlueToothConnection()
{
  blueToothSerial.begin(38400); //Set BluetoothBee BaudRate to default baud rate 38400
  blueToothSerial.print("\r\n+STWMOD=1\r\n");//set the bluetooth work in master mode
  blueToothSerial.print("\r\n+STNA=SeeedBTMaster\r\n");//set the bluetooth name as "SeeedBTMaster"
  blueToothSerial.print("\r\n+STAUTO=0\r\n");// Auto-connection is forbidden here
  delay(2000); // This delay is required.
  blueToothSerial.flush();
  blueToothSerial.print("\r\n+INQ=1\r\n");//make the master inquire
  Serial.println("Master is inquiring!");
  delay(2000); // This delay is required.
    
  //find the target slave
  char recvChar;
  while(1){
    if(blueToothSerial.available()){
      recvChar = blueToothSerial.read();
      recvBuf += recvChar;
      nameIndex = recvBuf.indexOf(slaveName);//get the position of slave name
      //nameIndex -= 1;//decrease the ';' in front of the slave name, to get the position of the end of the slave address
      if ( nameIndex != -1 ){
        //Serial.print(recvBuf);
 	addrIndex = (recvBuf.indexOf(retSymb,(nameIndex - retSymb.length()- 18) ) + retSymb.length());//get the start position of slave address	 		
 	slaveAddr = recvBuf.substring(addrIndex, nameIndex);//get the string of slave address 			
 	break;
      }
    }
  }
  //form the full connection command
  connectCmd += slaveAddr;
  connectCmd += "\r\n";
  int connectOK = 0;
  Serial.print("Connecting to slave:");
  Serial.print(slaveAddr);
  Serial.println(slaveName);
  //connecting the slave till they are connected
  do{
    blueToothSerial.print(connectCmd);//send connection command
    recvBuf = "";
    while(1){
      if(blueToothSerial.available()){
        recvChar = blueToothSerial.read();
 	recvBuf += recvChar;
 	if(recvBuf.indexOf("CONNECT:OK") != -1){
          connectOK = 1;
 	  Serial.println("Connected!");
 	  blueToothSerial.print("Connected!");
 	  break;
 	}else if(recvBuf.indexOf("CONNECT:FAIL") != -1){
 	  Serial.println("Connect again!");
 	  break;
 	}
      }
    }
  }while(0 == connectOK);
}
void loop()
{ 
  {
  char recvChar;
  while(1){
    if(blueToothSerial.available()){//check if there's any data sent from the remote bluetooth shield
      recvChar = blueToothSerial.read();
      Serial.print(recvChar);
    }
    if(Serial.available()){//check if there's any data sent from the local serial terminal, you can add the other applications here
      recvChar  = Serial.read();
      blueToothSerial.print(recvChar);
    }	

  det = check();
      while (det == 'F')   //if incoming data is a F, move forward
      {     
          digitalWrite(pinForwardBack, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,0);  //To make the Left/Right Motor not move, you just need to make its speed 0.    
          det = check();          
      }  
     
      while (det == 'B')   //if incoming data is a B, move back
      {    
          digitalWrite(pinForwardBack, HIGH); 
          digitalWrite(pinBrakeForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,velocity); 
          analogWrite(pinLeftRightSpeed,0);         
          det = check();          
      } 

      while (det == 'L')   //if incoming data is a L, move wheels left
      {     
          digitalWrite(pinLeftRight, HIGH);
          digitalWrite(pinBrakeLeftRight, LOW);
          digitalWrite(pinForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,0);    //To make the Forward/Back Motor not move, you just need to make its speed 0.
          analogWrite(pinLeftRightSpeed,255);        
          det = check();          
      }  
     
      while (det == 'R')   //if incoming data is a R, move wheels right
      {    
          digitalWrite(pinLeftRight, LOW);
          digitalWrite(pinBrakeLeftRight, LOW);
          digitalWrite(pinForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,0);
          analogWrite(pinLeftRightSpeed,255);         
          det = check();          
      }
     
      while (det == 'I')   //if incoming data is a I, turn right forward
      {     
          digitalWrite(pinLeftRight, LOW);
          digitalWrite(pinForwardBack, LOW);          
          digitalWrite(pinBrakeLeftRight, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW);  
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,255);                  
          det = check();          
      }  
     
      while (det == 'J')   //if incoming data is a J, turn right back
      {      
          digitalWrite(pinLeftRight, LOW);
          digitalWrite(pinForwardBack, HIGH);         
          digitalWrite(pinBrakeLeftRight, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,255);          
          det = check();          
      }          
     
      while (det == 'G')   //if incoming data is a G, turn left forward
      { 
          digitalWrite(pinLeftRight, HIGH);       
          digitalWrite(pinForwardBack, LOW);
          digitalWrite(pinBrakeLeftRight, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW); 
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,255);          
          det = check();          
      }    
     
      while (det == 'H')   //if incoming data is a H, turn left back
      {
          digitalWrite(pinLeftRight, HIGH);
          digitalWrite(pinForwardBack, HIGH); 
          digitalWrite(pinBrakeLeftRight, LOW); 
          digitalWrite(pinBrakeForwardBack, LOW);
          analogWrite(pinForwardBackSpeed,velocity);
          analogWrite(pinLeftRightSpeed,255);          
          det = check();                                              
      }   
      
      while (det == 'S')   //if incoming data is a S, stop
      {
          digitalWrite(pinForwardBack, LOW); 
          digitalWrite(pinLeftRight, LOW);
          analogWrite(pinForwardBackSpeed,0);
          analogWrite(pinLeftRightSpeed,0);          
          det = check(); 
      }
      
      while (det == 'U')   //if incoming data is a U, turn ON front lights
      {
          digitalWrite(pinfrontLights, HIGH);          
          det = check(); 
      }
      
      while (det == 'u')   //if incoming data is a u, turn OFF front lights
      {
          digitalWrite(pinfrontLights, LOW);          
          det = check(); 
      }
      
      while (det == 'W')   //if incoming data is a W, turn ON back lights
      {
          digitalWrite(pinbackLights, HIGH);          
          det = check(); 
      }
      
      while (det == 'w')   //if incoming data is a w, turn OFF back lights
      {
          digitalWrite(pinbackLights, LOW);
          det = check(); 
      }
}

int check()
{
 
  if (Serial.available() > 0)    //Check for data on the serial lines.
  {   
    dataIn = Serial.read();  //Get the character sent by the phone and store it in 'dataIn'.
       
        if (dataIn == 'F')
        {     
          determinant = 'F';
        }  
       
        else if (dataIn == 'B')
        { 
          determinant = 'B'; 
        }
       
        else if (dataIn == 'L')  
        { 
          determinant = 'L';
        }
        
        else if (dataIn == 'R')  
        { 
          determinant = 'R';
        } 
        
        else if (dataIn == 'I')  
        { 
          determinant = 'I'; 
        }  
       
        else if (dataIn == 'J')  
        {  
          determinant = 'J';
        }          
        
        else if (dataIn == 'G') 
        {
          determinant = 'G'; 
        }    
        
        else if (dataIn == 'H')  
        {
          determinant = 'H'; 
        }   
        
        else if (dataIn == 'S') 
        {
          determinant = 'S';
        }
        
        else if (dataIn == '0') 
        {
          velocity = 0;    //"velocity" does not need to be returned.
        }
        
        else if (dataIn == '1') 
        {
          velocity = 25;
        }
        
        else if (dataIn == '2') 
        {
          velocity = 50;
        }
        
        else if (dataIn == '3') 
        {
          velocity = 75;
        }
        
        else if (dataIn == '4') 
        {
          velocity = 100;
        }
        
        else if (dataIn == '5') 
        {
          velocity = 125;
        }
        
        else if (dataIn == '6') 
        {
          velocity = 150;
        }
        
        else if (dataIn == '7') 
        {
          velocity = 175;
        }
        
        else if (dataIn == '8') 
        {
          velocity = 200;
        }
        
        else if (dataIn == '9') 
        {
          velocity = 225;
        }
        
        else if (dataIn == 'q') 
        {
          velocity = 255;
        }
        
        else if (dataIn == 'U') 
        {
          determinant = 'U';
        }
        
        else if (dataIn == 'u') 
        {
          determinant = 'u';
        }
        
        else if (dataIn == 'W') 
        {
          determinant = 'W';
        }
       
        else if (dataIn == 'w') 
        {
          determinant = 'w';
        }
  }
}

return determinant;
}
}

Your check function is declared and implemented inside your loop function:

void loop()
{
  ...
  int check()
  {
    ...
  }
}

Your check function should be outside your loop function:

void loop()
{
  ...
}

int check()
{
  ...
}

Using the Tools > Auto Format tool will make it easier to see these formatting mistakes.

Right, so I fixed the problems and uploaded the code to the arduino. The Bluetooth module is searching, however my phone is unable to find it. I think there may be a problem because the code has set the arduino as master, rather than slave.

shahidzain67:
Right, so I fixed the problems and uploaded the code to the arduino. The Bluetooth module is searching, however my phone is unable to find it. I think there may be a problem because the code has set the arduino as master, rather than slave.

Your initial post indicates you want the Bluetooth shield to connect to your phone, but this post indicates you want to phone to connect to your Bluetooth shield. Which is it?

Well basically I want to use an app on my phone to control the car via bluetooth. So, phone should connect to shield

shahidzain67:
Well basically I want to use an app on my phone to control the car via bluetooth. So, phone should connect to shield

So start with the slave example and modify it from there.

That's what I've been trying! I've got to the point where I can connect my phone to the car and use the app on the phone, but whenever I press a button on the app, all I hear is a clicking sound from the arduino but no movement from the motors at all.

all I hear is a clicking sound from the arduino

The Arduino has nothing that can make a clicking sound. The sound MUST be coming from somewhere else.

Well it is! I think it may be coming from the Arduino uno, and my motors aren't connected correctly, but that shouldn't be so because I followed the instructions perfectly and other codes show the motors working correctly.... I am running out of ideas here. ..

shahidzain67:
and my motors aren't connected correctly

So instead of assuming it's the improperly connected mechanical device, you're going to assume it's the device with no moving parts?

Well I don't know! Im new to all this!

shahidzain67:
Well I don't know! Im new to all this!

But you think you know better than AWOL, who has been doing this for a while?

No! It was just a guess I made! Can you please just help solve the problem?