exit status 1 'checkBTcmd' was not declared in this scope

Hi got this code from here for motor control, but I keep getting the same this error can anyone tell me what is wrong?
The code is taken from Marcelo Rovai page on hacking a radio control car, No mater i copy the code or write it I keep getting the same error!!!
Anyway on contacting the author Marcelo Rovai????

exit status 1 'checkBTcmd' was not declared in this scope

void loop()
{
checkBTcmd(); // verify if a comand is received from BT remote control
receiveCmd ();

if (turnOn) manualCmd ();
else stopRobot ();
}

The code is taken from Marcelo Rovai page on hacking a radio control car,

You want US to find that for you? Fat chance.

checkBTcmd' was not declared in this scope

So, in what scope HAVE you declared that function?

Sorry, I'm new to all this, I haven't done much of this before. So i just copied the code, but that is all i keep getting. I'm not sure about what scope it is, this is the very first few lines of the code,

Is that all of the code that you copied?

So where did you copy the code from? Post the link.

this is the very first few lines of the code,

The stickies at the top of the forum - the ones you were supposed to read before posting here - say to post ALL of your code. Most likely, you have a function with a similar name, but some letters are capitalized in the function but not in the call, or you have a misplaced curly braces.

Read the stickies, and post ALL of your code correctly. This IS a test.

Sorry i had to pop out,

Here is the Link
https://create.arduino.cc/projecthub/mjrovai/hacking-a-rc-car-to-control-it-using-an-android-device-7d5b9a
All the code is there

void loop()
{
checkBTcmd(); // verify if a comand is received from BT remote control
receiveCmd ();

if (turnOn) manualCmd ();
else stopRobot ();
}
void checkBTcmd()
{
if (BT1.available())
{
command = BT1.read();
BT1.flush();
}
}

void receiveCmd ()
{

switch (command)
{
case 'p':
Serial.println("command ==> p");
turnOn = !turnOn;
command = 0;
analogWrite(ledStatus, turnOn*128); // Robot ON - Led ON
beep(outBuz, 1000, 100);
BT1.print(" COMMAND ON/OFF");
BT1.println('\n');
delay(200); //Delay to call attention to mode change
break;

case 'm': //not used here
break;
}
}
void manualCmd()
{
switch (command)
{
case 'f':
moveStop(); //turn off both motors
state = command;
break;

case 'w':
moveForward();
state = command;
break;

case 'd':
moveRight();
break;

case 'a':
moveLeft();
break;

case 's':
moveBackward();
state = command;
break;

case '+':
if (state == 'w')
{
motorSpeed = motorSpeed + 10;
if (motorSpeed > MAX_SPEED)
{
motorSpeed = MAX_SPEED;
}
command = 'w';
} else {command = state;}
break;

case '-':

if (state == 'w')
{
motorSpeed = motorSpeed - 10;
}
if (motorSpeed < MIN_SPEED )
{
motorSpeed = MIN_SPEED;
}
Serial.println(motorSpeed);
command = state;
break;
}
}
void moveForward() // rear motor FW
{
analogWrite(rearMtEne, motorSpeed);
digitalWrite(rearMtFw, HIGH);
digitalWrite(rearMtBw, LOW);

digitalWrite(frontMtEne, LOW);
digitalWrite(ledRed, LOW);
delay(5);
}
void stopRobot ()
{
digitalWrite(ledBlue, LOW);
digitalWrite(ledRed, LOW);

state = 0;
moveStop(); //turn off both motors
}
// Motor Drives
const int rearMtFw = 4; // Rear Motor - FW
const int rearMtBw = 7; // Rear Motor - BW
const int rearMtEne = 6; // Rear Motor - enable
const int frontMtLeft = 2; // Front Motor - turn Left
const int frontMtRight = 3; // Front Motor - turn right
const int frontMtEne = 5; // Front Motor enable
void moveForward() // rear motor FW
{
analogWrite(rearMtEne, motorSpeed);
digitalWrite(rearMtFw, HIGH);
digitalWrite(rearMtBw, LOW);

digitalWrite(frontMtEne, LOW);
digitalWrite(ledRed, LOW);
delay(5);
}
void moveBackward() // rear motor BW
{
analogWrite(rearMtEne, motorSpeed);
digitalWrite(rearMtFw, LOW);
digitalWrite(rearMtBw, HIGH);

digitalWrite(frontMtEne, LOW);
digitalWrite(ledRed, HIGH);
delay(5);
}
void moveLeft() // front motor left
{
digitalWrite(frontMtEne, HIGH);
digitalWrite(frontMtLeft, HIGH);
digitalWrite(frontMtRight, LOW);
digitalWrite(ledRed, LOW);
delay(10);
}

//******************************************************************************//

void moveRight() // front motor right
{
digitalWrite(frontMtEne, HIGH);
digitalWrite(frontMtLeft, LOW);
digitalWrite(frontMtRight, HIGH);
digitalWrite(ledRed, LOW);
delay(10);
}
void stopRobot ()
{
digitalWrite(ledBlue, LOW);
digitalWrite(ledRed, LOW);

state = 0;
moveStop(); //turn off both motors
}

When I compile the code you improperly posted (You FAILED the test), I get:

sketch_jan05b.ino: In function 'void loop()':
sketch_jan05b:6: error: 'turnOn' was not declared in this scope
sketch_jan05b.ino: In function 'void checkBTcmd()':
sketch_jan05b:11: error: 'BT1' was not declared in this scope
sketch_jan05b:13: error: 'command' was not declared in this scope
sketch_jan05b.ino: In function 'void receiveCmd()':
sketch_jan05b:21: error: 'command' was not declared in this scope
sketch_jan05b:25: error: 'turnOn' was not declared in this scope
sketch_jan05b:27: error: 'ledStatus' was not declared in this scope
sketch_jan05b:28: error: 'outBuz' was not declared in this scope
sketch_jan05b:28: error: 'beep' was not declared in this scope
sketch_jan05b:29: error: 'BT1' was not declared in this scope
sketch_jan05b.ino: In function 'void manualCmd()':
sketch_jan05b:40: error: 'command' was not declared in this scope
sketch_jan05b:43: error: 'moveStop' was not declared in this scope
sketch_jan05b:44: error: 'state' was not declared in this scope
sketch_jan05b:68: error: 'motorSpeed' was not declared in this scope
sketch_jan05b:69: error: 'MAX_SPEED' was not declared in this scope
sketch_jan05b:81: error: 'motorSpeed' was not declared in this scope
sketch_jan05b:83: error: 'motorSpeed' was not declared in this scope
sketch_jan05b:83: error: 'MIN_SPEED' was not declared in this scope
sketch_jan05b:87: error: 'motorSpeed' was not declared in this scope
sketch_jan05b.ino: In function 'void moveForward()':
sketch_jan05b:94: error: 'rearMtEne' was not declared in this scope
sketch_jan05b:94: error: 'motorSpeed' was not declared in this scope
sketch_jan05b:95: error: 'rearMtFw' was not declared in this scope
sketch_jan05b:96: error: 'rearMtBw' was not declared in this scope
sketch_jan05b:98: error: 'frontMtEne' was not declared in this scope
sketch_jan05b:99: error: 'ledRed' was not declared in this scope
sketch_jan05b.ino: In function 'void stopRobot()':
sketch_jan05b:104: error: 'ledBlue' was not declared in this scope
sketch_jan05b:105: error: 'ledRed' was not declared in this scope
sketch_jan05b:107: error: 'state' was not declared in this scope
sketch_jan05b:108: error: 'moveStop' was not declared in this scope
sketch_jan05b.ino: In function 'void moveForward()':
sketch_jan05b:117: error: redefinition of 'void moveForward()'
sketch_jan05b:92: error: 'void moveForward()' previously defined here
sketch_jan05b:119: error: 'motorSpeed' was not declared in this scope
sketch_jan05b:124: error: 'ledRed' was not declared in this scope
sketch_jan05b.ino: In function 'void moveBackward()':
sketch_jan05b:129: error: 'motorSpeed' was not declared in this scope
sketch_jan05b:134: error: 'ledRed' was not declared in this scope
sketch_jan05b.ino: In function 'void moveLeft()':
sketch_jan05b:142: error: 'ledRed' was not declared in this scope
sketch_jan05b.ino: In function 'void moveRight()':
sketch_jan05b:153: error: 'ledRed' was not declared in this scope
sketch_jan05b.ino: In function 'void stopRobot()':
sketch_jan05b:156: error: redefinition of 'void stopRobot()'
sketch_jan05b:102: error: 'void stopRobot()' previously defined here
sketch_jan05b:158: error: 'ledBlue' was not declared in this scope
sketch_jan05b:159: error: 'ledRed' was not declared in this scope
sketch_jan05b:161: error: 'state' was not declared in this scope
sketch_jan05b:162: error: 'moveStop' was not declared in this scope

So, not only did you NOT post the code correctly, you did not post ALL of it.

Sorry i just copied and that's all was there, that is why I'm on here!!

(deleted)

This is the link where the code comes from Hacking a RC car to control it using an Android device.

You have only implemented the loop() function. You're missing pieces. Step 7 starts with the loop() which gives you the basic framework; you copied that. A few lines later Marcelo shows the code for the checkBTcmd() function; copy that from the page and paste it after the loop() function so it looks like

void loop() 
{
  checkBTcmd();  // verify if a comand is received from BT remote control
  receiveCmd ();
  
  if (turnOn) manualCmd ();
  else stopRobot ();
}

void checkBTcmd()  
{ 
  if (BT1.available()) 
  { 
    command = BT1.read();
    BT1.flush();
  }
}

Do this for all the code blocks that Marcelo gives on that page.

There is however a piece missing (the setup() function and some other stuff). Go to the github page as @spycatcher2k indicated; you could have found the link near the bottom of the article.

Click the 'clone or download' button and download the zip. Extract the files; you will get the below directories and files.

MJROBOT-AUTOBOT-MASTER
\---MJRoBot-AutoBot-master
    |   README.md
    |
    \---MJRoBot_AutoBot_Arduino_Code
            generalFuntions.ino
            MJRoBot_AutoBot.ino
            motorRobot.ino
            robotDefines.h

Rename the directory MJRoBot_AutoBot_Arduino_Code to MJRoBot_AutoBot. Double-click the MJRoBot_AutoBot.ino file in the renamed directory and you should be good to go.

Marcelo has split the code over several files; study them and ask questions if you don't understand something.