Error compiling for board ardunino uno

#include <DRV8434S.h>

#include <Accessories.h>
#include <LocoStepper.h>

#include <VarSpeedServo.h>

#include <Adafruit_BusIO_Register.h>
#include <Adafruit_I2CDevice.h>
#include <Adafruit_I2CRegister.h>
#include <Adafruit_SPIDevice.h>

#include <AccelStepper.h>
#include <MultiStepper.h>
#include <Stepper.h>
#include <Servo.h>
#include <AFMotor.h>

/*

#include <ezButton.h>
#include <AccelStepper.h>

#define MAX_POSITION 0x7FFFFFFF // maximum of position we can set (long type)

ezButton limitSwitch(A0); // create ezButton object that attach to pin A0;

AccelStepper stepper(AccelStepper::FULL4WIRE, 3, 6, 5, 4);

bool isStopped = false;

void setup() {
Serial.begin(9600);

stepper.setSpeed(120);
limitSwitch.setDebounceTime(50); // set debounce time to 50 milliseconds

stepper.setMaxSpeed(500.0); // set the maximum speed
stepper.setAcceleration(50.0); // set acceleration
stepper.setSpeed(500); // set initial speed
stepper.setCurrentPosition(0); // set position

stepper.moveTo(MAX_POSITION);{

}

limitSwitch.loop(); // MUST call the loop() function first

if (limitSwitch.isPressed()); {
Serial.println(F("The limit switch: TOUCHED"));
isStopped = true;
}

if (isStopped == false); {
// without this part, the move will stop after reaching maximum position
if (stepper.distanceToGo() == 0); { // if motor moved to the maximum position
stepper.setCurrentPosition(0); // reset position to 0
stepper.moveTo(MAX_POSITION); // move the motor to maximum position again
}

stepper.run(); // MUST be called in loop() function

} else
// without calling stepper.run() function, motor stops immediately
// NOTE: stepper.stop() function does NOT stops motor immediately
Serial.println(F("The stepper motor is STOPPED"));

ezButton limitSwitch(7); // create ezButton object that attach to pin 7;

if(limitSwitch.isPressed())
Serial.println("The limit switch: UNTOUCHED -> TOUCHED");

if(limitSwitch.isReleased())
Serial.println("The limit switch: TOUCHED -> UNTOUCHED");

int state = limitSwitch.getState();
if(state == HIGH)
Serial.println("The limit switch: UNTOUCHED");
else
Serial.println("The limit switch: TOUCHED");
}

Welcome
Try the forum guidelines at the top of each section. Use code tags and post in the right section

thx, but I am very new to this... can you make it more simpler to understand

One of your mistakes is

if (isStopped == false);
...
...
else

That will result in an error like "else without if"; remove the semi-colon.

Another one is that the end of your code has two } at the beginning of a line after I applied a tools -> autoformat. This indicates that you made a mess of the { and the }; each { needs to have a matching } and vice versa.

There might be more.

Your topic has been moved to a more suitable location on the forum. *Installation and Troubleshooting is not for problems with your project.

Please edit your post, select all code and click the </> button to apply code tags; next save your post. This will prevent the forum software from corrupting it and makes it easier to read and copy.

Please post all errors, again using code tags.

what is the error?

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.