Hello everyone,
I have two Stepper motor, a ramps 1.4 and an arduino uno.
Now I wanted to use the stepper motors, but I'm a little bit bad in write scripts.
I found one script with the function to start the motor.
#define X_STEP_PIN 54
#define X_DIR_PIN 55
#define X_ENABLE_PIN 38
#include "AccelStepper.h" // Nebenbei, wo ist eigentlich der Unterschied, ob man oder"AccelStepper.h" schreibt ??
AccelStepper stepper(1, X_STEP_PIN, X_DIR_PIN);
void setup()
{
stepper.setEnablePin(X_ENABLE_PIN);
stepper.setPinsInverted(false, false, true); //invert logic of enable pin
stepper.enableOutputs();
// Alternativ müssten die folgenden Zeilen auch funktionieren, weis nur nicht sicher was mehr Sinn macht!!
//pinMode(X_ENABLE_PIN , OUTPUT);
//digitalWrite(X_ENABLE_PIN , LOW);
stepper.setMaxSpeed(400128);
stepper.setSpeed(100128);
stepper.setAcceleration(1000);
}
void loop()
{
stepper.runSpeed();
}
But it will not compile, the error is:
Arduino: 1.8.4 (Linux), Board: "Arduino/Genuino Uno"
^
compilation terminated.
exit status 1
Error compiling for board Arduino/Genuino Uno.
This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
Can you help me to fix the error?
Thank you!