Expected '}' at end of input Arduino Nano Elegoo

Hello! I'm doing a project in Arduino, basically is programming a MiniCar from Elegoo. I found this programm in the Elegoo page (for the programming of the MiniCar Robot) and just did a copy-paste to see if it works. Now this message pops up, and i have checked several times (and with a results page) and think there is every bracket. I also installed a driver to detect the port. The problem is that i tried a different board (an Arduino Nano from Arduino) and it doesn't upload, it's stuck in uploading.
I would really appreciate some help.
Thank you!

PROGRAMM:

class L293
{
public:
int left_1_pin;
int left_2_pin;
int right_1_pin;
int right_2_pin;
int enable_left_pin;
int enable_right_pin;
int car_speed = 0;
int turn_speed = 0;
uint16_t left_speed = 0;
uint16_t right_speed = 0;

enum RUN_STATUE
{
STOP,
BACK,
FORWARD,
LEFT,
RIGHT
} run_statue = STOP;

void setup (int left1pin, int left2pin, int right1pin, int right2pin, int enableleftpin, int enablerightpin)
{
left_1_pin = left1pin;
left_2_pin = left2pin;
right_1_pin = right1pin;
right_2_pin = right2pin;
enable_left_pin = enableleftpin;
enable_right_pin = enablerightpin;
pinMode(left_1_pin, OUTPUT);
pinMode(left_2_pin, OUTPUT);
pinMode(right_1_pin, OUTPUT);
pinMode(right_2_pin, OUTPUT);
pinMode(enable_left_pin, OUTPUT);
pinMode(enable_right_pin, OUTPUT);
stop();
}

void leftFront(int leftspeed)
{
analogWrite(enable_left_pin, leftspeed);
digitalWrite(left_1_pin, HIGH);
digitalWrite(left_2_pin, LOW);
}

void leftBack(int leftspeed)
{
analogWrite(enable_left_pin, leftspeed);
digitalWrite(left_1_pin, LOW);
digitalWrite(left_2_pin, HIGH);
}

void leftStop()
{
analogWrite(enable_left_pin, 0);
digitalWrite(left_1_pin, LOW);
digitalWrite(left_2_pin, LOW);
}

void rightFront(int rightspeed)
{
analogWrite(enable_right_pin, rightspeed);
digitalWrite(right_1_pin, LOW);
digitalWrite(right_2_pin, HIGH);
}

void rightBack(int rightspeed)
{
analogWrite(enable_right_pin, rightspeed);
digitalWrite(right_1_pin, HIGH);
digitalWrite(right_2_pin, LOW);
}

void rightStop()
{
analogWrite(enable_right_pin, 0);
digitalWrite(right_1_pin, LOW);
digitalWrite(right_2_pin, LOW);
}

void forward(int speed)
{
run_statue = FORWARD;
left_speed = speed;
right_speed = speed;
leftFront(speed);
rightFront(speed);
}

void back(int speed)
{
run_statue = BACK;
left_speed = speed;
right_speed = speed;
leftBack(speed);
rightBack(speed);
}

void left(int speed)
{
run_statue = LEFT;
left_speed = speed;
right_speed = speed;
leftBack(speed);
rightFront(speed);
}

void right(int speed)
{
run_statue = RIGHT;
left_speed = speed;
right_speed = speed;
leftFront(speed);
rightBack(speed);
}

void stop()
{
run_statue = STOP;
left_speed = 0;
right_speed = 0;
car_speed = 0;
turn_speed = 0;
leftStop();
rightStop();
}

void left2(int speed)
{
run_statue = LEFT;
left_speed = speed;
right_speed = speed;
leftFront(speed - 100);
rightFront(speed);
}

void right2(int speed)
{
run_statue = RIGHT;
left_speed = speed;
right_speed = speed;
leftFront(speed);
rightFront(speed - 100);
}

PROBLEM:

Arduino:1.8.13 (Windows 10), Tarjeta:"Arduino Nano, ATmega328P (Old Bootloader)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Nina\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Nina\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Nina\OneDrive\Documentos\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=04D9_B534 -ide-version=10813 -build-path C:\Users\Nina\AppData\Local\Temp\arduino_build_524955 -warnings=none -build-cache C:\Users\Nina\AppData\Local\Temp\arduino_cache_529741 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.arduinoOTA-1.1.1.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avrdude-6.3.0-arduino9.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.avr-gcc-4.9.2-atmel3.5.4-arduino2.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\Nina\OneDrive\Documentos\Arduino\TdR\prova\prova.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Nina\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Nina\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Nina\OneDrive\Documentos\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=04D9_B534 -ide-version=10813 -build-path C:\Users\Nina\AppData\Local\Temp\arduino_build_524955 -warnings=none -build-cache C:\Users\Nina\AppData\Local\Temp\arduino_cache_529741 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.arduinoOTA-1.1.1.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avrdude-6.3.0-arduino9.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.avr-gcc-4.9.2-atmel3.5.4-arduino2.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\Nina\OneDrive\Documentos\Arduino\TdR\prova\prova.ino

Using board 'nano' from platform in folder: C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21

Using core 'arduino' from platform in folder: C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21

Detecting libraries used...

"C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino" "-IC:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\variants\eightanaloginputs" "C:\Users\Nina\AppData\Local\Temp\arduino_build_524955\sketch\prova.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Generating function prototypes...

"C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino" "-IC:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\variants\eightanaloginputs" "C:\Users\Nina\AppData\Local\Temp\arduino_build_524955\sketch\prova.ino.cpp" -o "C:\Users\Nina\AppData\Local\Temp\arduino_build_524955\preproc\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE

"C:\Program Files (x86)\Arduino\tools-builder\ctags\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\Users\Nina\AppData\Local\Temp\arduino_build_524955\preproc\ctags_target_for_gcc_minus_e.cpp"

Compilando programa...

"C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\cores\arduino" "-IC:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21\variants\eightanaloginputs" "C:\Users\Nina\AppData\Local\Temp\arduino_build_524955\sketch\prova.ino.cpp" -o "C:\Users\Nina\AppData\Local\Temp\arduino_build_524955\sketch\prova.ino.cpp.o"

prova:146:3: error: expected '}' at end of input

}

^

prova:146:3: error: expected unqualified-id at end of input

exit status 1

expected '}' at end of input

Link?

It's in a carpet inside here: http://69.195.111.207/tutorial-download/?t=miniCarKit
The carpet is minicar

If you were to Auto Format the code in the IDE you would see that it ends like this

    void left2(int speed)
    {
      run_statue = LEFT;
      left_speed = speed;
      right_speed = speed;
      leftFront(speed - 100);
      rightFront(speed);
    }

    void right2(int speed)
    {
      run_statue = RIGHT;
      left_speed = speed;
      right_speed = speed;
      leftFront(speed);
      rightFront(speed - 100);
    }

There is obviously at least one curly bracket missing because the last one is not on the left margin

Please follow the advice given in the link below when posting code , use code tags and post the code here to make it easier to read and copy for examination

If you get errors when compiling please copy them from the IDE using the "Copy error messages" button and paste the clipboard here in code tags

thank you very much! i'm new in this stuff, just starting...
I will try it and see if it works

class L293
{
public:
  int left_1_pin;
  int left_2_pin;
  int right_1_pin;
  int right_2_pin;
  int enable_left_pin;
  int enable_right_pin;
  int car_speed = 0;
  int turn_speed = 0;
  uint16_t left_speed = 0;
  uint16_t right_speed = 0;

  enum RUN_STATUE
  {
    STOP,
    BACK,
    FORWARD,
    LEFT,
    RIGHT
  } run_statue = STOP;

  void setup (int left1pin, int left2pin, int right1pin, int right2pin, int enableleftpin, int enablerightpin)
  {
    left_1_pin = left1pin;
    left_2_pin = left2pin;
    right_1_pin = right1pin;
    right_2_pin = right2pin;
    enable_left_pin = enableleftpin;
    enable_right_pin = enablerightpin;
    pinMode(left_1_pin, OUTPUT);
    pinMode(left_2_pin, OUTPUT);
    pinMode(right_1_pin, OUTPUT);
    pinMode(right_2_pin, OUTPUT);
    pinMode(enable_left_pin, OUTPUT);
    pinMode(enable_right_pin, OUTPUT);
    stop();
  }

  void leftFront(int leftspeed)
  {
    analogWrite(enable_left_pin, leftspeed);
    digitalWrite(left_1_pin, HIGH);
    digitalWrite(left_2_pin, LOW);
  }

  void leftBack(int leftspeed)
  {
    analogWrite(enable_left_pin, leftspeed);
    digitalWrite(left_1_pin, LOW);
    digitalWrite(left_2_pin, HIGH);
  }

  void leftStop()
  {
    analogWrite(enable_left_pin, 0);
    digitalWrite(left_1_pin, LOW);
    digitalWrite(left_2_pin, LOW);
  }

  void rightFront(int rightspeed)
  {
    analogWrite(enable_right_pin, rightspeed);
    digitalWrite(right_1_pin, LOW);
    digitalWrite(right_2_pin, HIGH);
  }

  void rightBack(int rightspeed)
  {
    analogWrite(enable_right_pin, rightspeed);
    digitalWrite(right_1_pin, HIGH);
    digitalWrite(right_2_pin, LOW);
  }

  void rightStop()
  {
    analogWrite(enable_right_pin, 0);
    digitalWrite(right_1_pin, LOW);
    digitalWrite(right_2_pin, LOW);
  }

  void forward(int speed)
  {
    run_statue = FORWARD;
    left_speed = speed;
    right_speed = speed;
    leftFront(speed);
    rightFront(speed);
  }

  void back(int speed)
  {
    run_statue = BACK;
    left_speed = speed;
    right_speed = speed;
    leftBack(speed);
    rightBack(speed);
  }

  void left(int speed)
  {
    run_statue = LEFT;
    left_speed = speed;
    right_speed = speed;
    leftBack(speed);
    rightFront(speed);
  }

  void right(int speed)
  {
    run_statue = RIGHT;
    left_speed = speed;
    right_speed = speed;
    leftFront(speed);
    rightBack(speed);
  }

  void stop()
  {
    run_statue = STOP;
    left_speed = 0;
    right_speed = 0;
    car_speed = 0;
    turn_speed = 0;
    leftStop();
    rightStop();
  }

  void left2(int speed)
  {
    run_statue = LEFT;
    left_speed = speed;
    right_speed = speed;
    leftFront(speed - 100);
    rightFront(speed);
  }

  void right2(int speed)
  {
    run_statue = RIGHT;
    left_speed = speed;
    right_speed = speed;
    leftFront(speed);
    rightFront(speed - 100);
  }
}  

Arduino:1.8.13 (Windows 10), Tarjeta:"Arduino Nano, ATmega328P (Old Bootloader)"

C:\Program Files (x86)\Arduino\arduino-builder -dump-prefs -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Nina\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Nina\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Nina\OneDrive\Documentos\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=04D9_B534 -ide-version=10813 -build-path C:\Users\Nina\AppData\Local\Temp\arduino_build_524955 -warnings=none -build-cache C:\Users\Nina\AppData\Local\Temp\arduino_cache_529741 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.arduinoOTA-1.1.1.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avrdude-6.3.0-arduino9.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.avr-gcc-4.9.2-atmel3.5.4-arduino2.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\Nina\OneDrive\Documentos\Arduino\TdR\prova\prova.ino

C:\Program Files (x86)\Arduino\arduino-builder -compile -logger=machine -hardware C:\Program Files (x86)\Arduino\hardware -hardware C:\Users\Nina\AppData\Local\Arduino15\packages -tools C:\Program Files (x86)\Arduino\tools-builder -tools C:\Program Files (x86)\Arduino\hardware\tools\avr -tools C:\Users\Nina\AppData\Local\Arduino15\packages -built-in-libraries C:\Program Files (x86)\Arduino\libraries -libraries C:\Users\Nina\OneDrive\Documentos\Arduino\libraries -fqbn=arduino:avr:nano:cpu=atmega328old -vid-pid=04D9_B534 -ide-version=10813 -build-path C:\Users\Nina\AppData\Local\Temp\arduino_build_524955 -warnings=none -build-cache C:\Users\Nina\AppData\Local\Temp\arduino_cache_529741 -prefs=build.warn_data_percentage=75 -prefs=runtime.tools.arduinoOTA.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.arduinoOTA-1.1.1.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\arduinoOTA\1.1.1 -prefs=runtime.tools.avrdude.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avrdude-6.3.0-arduino9.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avrdude\6.3.0-arduino9 -prefs=runtime.tools.avr-gcc.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -prefs=runtime.tools.avr-gcc-4.9.2-atmel3.5.4-arduino2.path=C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\4.9.2-atmel3.5.4-arduino2 -verbose C:\Users\Nina\OneDrive\Documentos\Arduino\TdR\prova\prova.ino

Using board 'nano' from platform in folder: C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21

Using core 'arduino' from platform in folder: C:\Users\Nina\AppData\Local\Arduino15\packages\arduino\hardware\avr\1.6.21

Detecting libraries used...

"C:\\Users\\Nina\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\Nina\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.21\\cores\\arduino" "-IC:\\Users\\Nina\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.21\\variants\\eightanaloginputs" "C:\\Users\\Nina\\AppData\\Local\\Temp\\arduino_build_524955\\sketch\\prova.ino.cpp" -o nul -DARDUINO_LIB_DISCOVERY_PHASE

Generating function prototypes...

"C:\\Users\\Nina\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -flto -w -x c++ -E -CC -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\Nina\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.21\\cores\\arduino" "-IC:\\Users\\Nina\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.21\\variants\\eightanaloginputs" "C:\\Users\\Nina\\AppData\\Local\\Temp\\arduino_build_524955\\sketch\\prova.ino.cpp" -o "C:\\Users\\Nina\\AppData\\Local\\Temp\\arduino_build_524955\\preproc\\ctags_target_for_gcc_minus_e.cpp" -DARDUINO_LIB_DISCOVERY_PHASE

"C:\\Program Files (x86)\\Arduino\\tools-builder\\ctags\\5.8-arduino11/ctags" -u --language-force=c++ -f - --c++-kinds=svpf --fields=KSTtzns --line-directives "C:\\Users\\Nina\\AppData\\Local\\Temp\\arduino_build_524955\\preproc\\ctags_target_for_gcc_minus_e.cpp"

Compilando programa...

"C:\\Users\\Nina\\AppData\\Local\\Arduino15\\packages\\arduino\\tools\\avr-gcc\\4.9.2-atmel3.5.4-arduino2/bin/avr-g++" -c -g -Os -w -std=gnu++11 -fpermissive -fno-exceptions -ffunction-sections -fdata-sections -fno-threadsafe-statics -MMD -flto -mmcu=atmega328p -DF_CPU=16000000L -DARDUINO=10813 -DARDUINO_AVR_NANO -DARDUINO_ARCH_AVR "-IC:\\Users\\Nina\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.21\\cores\\arduino" "-IC:\\Users\\Nina\\AppData\\Local\\Arduino15\\packages\\arduino\\hardware\\avr\\1.6.21\\variants\\eightanaloginputs" "C:\\Users\\Nina\\AppData\\Local\\Temp\\arduino_build_524955\\sketch\\prova.ino.cpp" -o "C:\\Users\\Nina\\AppData\\Local\\Temp\\arduino_build_524955\\sketch\\prova.ino.cpp.o"

prova:147:1: error: expected ';' after class definition

 }  

 ^

exit status 1

expected ';' after class definition


Hi ninajubo,

On your last line, you forgot a semi-colon ";" after the closing bracket.

When you define a class, it goes like this:

class L293
{
    private:
        // define (almost) all attributes and some methods as private
    public:
        // define public methods
}; // <-- the semi-colon goes here

Note that you should avoid as much as possible having public attributes, since it means external objects can freely modify them and break everything in your instance.
Then to have access to the attributes you need to create methods called "getters" and "setters" which usually go like this:

    // after public:
    int get_left_1_pin(){
        return left_1_pin;
    }

    void set_left_1_pin(int pin){
        if (0<pin && pin<21){  // for example if there is a limit to the value of the pin
            left_1_pin = pin;
        }
    }
    // other methods

This helps prevent any "illegal" behavior.

Seems quite clear to me

The class ends like this in your code

    void right2(int speed)
    {
      run_statue = RIGHT;
      left_speed = speed;
      right_speed = speed;
      leftFront(speed);
      rightFront(speed - 100);
    }
}

Can you guess what is missing

thankyou soooo much! I will now try it, but it said it was fine! Thank you :smiley: :smiley:

How exactly did you copy the code into the IDE ?

It looks OK in the minicar.ino file in the Elegoo zip

Well, I will explain the project. Is basically programm the robot to go forward and backwards with Arduino, not the App. The problem is that i do not know the pins of the motors (it would be easier). So i just copied, to try it, directly the part I wanted from all the things the robot could do. I don't know if I explained myself.

@ninajubo, your topic has been moved to a more suitable location on the forum; this has nothing to do with Avrdude, stk500, Bootloader issues.