Ive been trying to learn how to use arduino for some time now but still need to learn the basics, so I was trying to play around the stepper but ive been crashing into this a lot, ive tried to uninstall and install but nothing, could someone help me?
CODE:
#include <Stepper.h>
const float STEPS_PER_REV = 32;
const float GEAR_RED = 64;
const float STEPS_PER_OUT_REV = STEPS_PER_REV * GEAR_RED;
int StepsRequired;
Stepper steppermotor(STEPS_PER_REV, 8, 10, 9, 11);
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
steppermotor.setSpeed(1);
StepsRequired = 4;
steppermotor.step(StepsRequired);
delay(2000);
StepsRequired = STEPS_PER_OUT_REV / 2;
steppermotor.setSpeed(100);
steppermotor.step(StepsRequired);
delay(1000);
StepsRequired = - STEPS_PER_OUT_REV / 2;
steppermotor.setSpeed(700);
steppermotor.step(StepsRequired);
delay(2000);
}
ERROR:
readlink C:\Users\alex_\OneDrive\Escritorio\New folder\sketch_jun19b\sketch_jun19b.ino: The system cannot find the file specified.
Error compiling for board Arduino/Genuino Mega or Mega 2560.