Error exit status 1 expected '}' at end of input

i am a beginner and i get the error “exit status 1 expected ‘}’ at end of input”

can someone help me fix the problem?

#include <AFMotor.h>

AF_DCMotor motor(2, MOTOR12_1KHZ); // create motor #2, 1KHz pwm
int LED1 = 0; // GEHEUGEN LED PIN 1
int LED2 = 0; // GEHEUGEN LED PIN 2
int REED = 0; // GEHEUGEN READ
int MOTORV = 0; // Geheugen motor vooruit
int MOTORA = 0; // Geheugen motor achteruit
void setup() {
Serial.begin(9600); // set up Serial library at 9600 bps
Serial.println(“Motor test!”);
pinMode(A0, INPUT); // maakt pin een uitgang read
pinMode(A1,INPUT); // maakt pin een uitgang button 1
pinMode(A2, INPUT); // maakt pin een uitgang button 2
pinMode(A3, OUTPUT); // maakt pin een INGANG led 1
pinMode(A4, OUTPUT); // maakt pin een INGANG led 2
pinMode(A5, OUTPUT); // maakt pin een INGANG led 3

motor.setSpeed(0); // set the speed to 0
}

void loop()

{
if (LED1 == 0 && digitalRead(A1) == HIGH && REED == 1){LED1 = 1;} else{} ;
if (LED1 == 0){ digitalWrite(A4, LOW);} else{digitalWrite(A4, HIGH); // als intern geheugen led 1 = 0 schakel led uit anders schakel led aan.
if (LED1 == 1 && REED == 1){MOTORA = 1;}

if (MOTORA == 1 && digitalRead(A1) == LOW) {motor.run(BACKWARD);
delay(1000);
if (MOTORA == 1 && digitalRead(A1) == HIGH) {motor.run(RELEASE);

if (LED2 == 0 && digitalRead(A2) == HIGH && REED == 0){LED2 = 1;// als geheugen led uit is, de button (a2) hoog is en de lift op de 1e verdieping staat zet intern geheugen led op 1, anders doe niks.

if (LED2 == 0){ digitalWrite(A5, LOW);} else{digitalWrite(A5, HIGH);} // als intern geheugen led 1 = 0 schakel led uit anders schakel led aan.

if (LED2 == 1 && REED == 0){MOTORV = 1;}

if (MOTORV == 1 && digitalRead(A1) == LOW) {motor.run(FORWARD);
delay(1000);

if (MOTORV == 1 && digitalRead(A1) == HIGH) {motor.run (BRAKE);}
}

Hello

First I am just lokking at your lines and I cant unde=urstand this :

if (MOTORA == 1 && digitalRead(A1) == HIGH) {motor.run(RELEASE);

Do not confuse parentheses and accolades, that is not the same thing.

An if work like this

if(var == 12)
{
//instructions
}

So your line should look like this :

if (MOTORA == 1 && digitalRead(A1) == HIGH)
{
motor.run(RELEASE);
}

Do not confuse parentheses and accolades

You won't get any of the latter around here

Attaboy AWOL!

Hi,
Welcome to the forum.

Please read the first post in any forum entitled how to use this forum.
http://forum.arduino.cc/index.php/topic,148850.0.html then look down to item #7 about how to post your code.
It will be formatted in a scrolling window that makes it easier to read.

Thanks.. Tom.. :slight_smile:

Learn to auto-indent your code and you won't make such elementary errors. Braces must match.

Are you sure that INPUT and uitgang are the same thing :smiley:

Use the auto format option in one of the menus of the IDE and I think that the problem reveals itself.