StepperMotor.h

I have created the StepperMotor.h file. After that, I tried saving it on many different places, but it says it is located in a wrong place. Where do I have to put the file? :confused:

hamithepenguin:
it says it is located in a wrong place.

I really doubt it said that. It probably said something else that you are paraphrasing as "located in a wrong place". That's not very helpful. We need the exact error message.

We also need details of what you're trying to do. Is StepperMotor.h supposed to be a library or is it part of a sketch?

ok here is the message :slight_smile:

Arduino: 1.8.1 (Windows 8), Board: "Arduino/Genuino Uno"

C:\Users\HJIS\Documents\Arduino\sketch_mar07a\sketch_mar07a.ino:2:26: fatal error: StepperMotor.h: No such file or directory

#include <StepperMotor.h>

^

compilation terminated.

exit status 1

Error compiling for board Arduino/Genuino Uno.
Invalid library found in \192.168\Students\00-Grade0\Hami El Penguino\2016-2017\Hami's Arduino\arduino-1.8.1\libraries\StepperMotor.h: \192.168\Students\00-Grade-0\Hami El Penguino\2016-2017\Hami's Arduino\arduino-1.8.1\libraries\StepperMotor.h

Invalid library found in \192.168\StudentsWork\00-Grade-0\Hami El Penguino\2016-2017\Hami's Arduino\arduino-1.8.1\libraries\StepperMotor.h: \192.168\Students\00-Grade-0\Hami El Penguino\2016-2017\Hami's Arduino\arduino-1.8.1\libraries\StepperMotor.h

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.

Now there's some information I can work with. The problem is that you have somehow installed the library incorrectly. From the warning I can't tell exactly what's wrong with it. You should have a folder structure something like this:libraries\StepperMotor\StepperMotor.h where StepperMotor.h is the actual library file, not a folder. The warning is telling you that the library does not have a folder structure that the Arduino IDE can recognize and so it is not available for use, thus the "No such file or directory" error you've encountered. So see if you can create the right folder structure and if you need help doing so I'd need to know exactly how the folder is structured. I suspect that \192.168\Students\00-Grade-0\Hami El Penguino\2016-2017\Hami's Arduino\arduino-1.8.1\libraries\StepperMotor.h is actually a folder, not a file because I don't get that warning in Arduino IDE 1.8.1 if I put a file at that location.

As a side note, you should never install libraries to the Arduino IDE installation folder, as you seem to have attempted to do here. The reason is that anything you add to that folder will be lost when you update to a new version of the Arduino IDE. Instead you should install libraries to the {sketchbook folder}\libraries folder. You can find the location of the sketchbook folder at File > Preferences > Sketchbook Location.

Please use code tags (</> button on the toolbar) when you post code or warning/error messages. The reason is that without those tags the forum software can interpret parts of it as markup (see the smiley faces in your last reply for an example), leading to confusion, wasted time, and a reduced chance for you to get help with your problem. This will also make it easier to read your code and to copy it to the IDE or editor. Using code tags and other important information is explained in the How to use this forum post. Please read it.

OK. Thank you very much.