Go Down

Topic: Error compiling (Read 62 times) previous topic - next topic

supanovazftw

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.

pert

The problem is caused by using the Arduino IDE with files located under the OneDrive folder.

This bug has been fixed but it's only available in the hourly build of the Arduino IDE:
http://www.arduino.cc/en/Main/Software#hourly

If you prefer not to use the hourly build then the other solution is to not use the Arduino IDE with any files in OneDrive.

If you have your sketchbook located under OneDrive you can change the location of the sketchbook folder via the Arduino IDE's File > Preferences > Sketchbook Location. Change that setting to any convenient folder on your computer as long as it's not in the OneDrive. The Arduino IDE does not automatically copy the contents of the previous sketchbook folder to the new location so you will need to do this manually.

Go Up