Go Down

Topic: Library import not working? (Read 1 time) previous topic - next topic


I recently downloaded the SoftwareServo library and installed it in the library folder.  I imported the library using the Sketch -> Import Library path, but when it puts the include in the file the SoftwareServo.h file doesn't change into a red color like all the other standard libraries.  I ignored that difference and tried to run a sketch, but it wouldn't run.  I'm assuming because the IDE for some reason doesn't see the library.  What do I do to fix this?


Coding Badly

but it wouldn't run

Are you saying the IDE crashed?


Coloring is based on a file supplied with the library. That file may or may not be complete. It is the compiler's ability to process the sketch that is important, not the color of the text on the screen.

If the compiler is able to compile, link, and upload a sketch, the IDE was able to find the library.

I ignored that difference and tried to run a sketch, but it wouldn't run.

Ignoring the lack of syntax coloring is fine. Failing to explain the "it wouldn't run" statement is not.

Was the compiler able to compile, link, and upload the sketch? What did you add to the sketch that involved the servo? What symptoms did the Arduino exhibit that caused you conclude that "it wouldn't run"?
The art of getting good answers lies in asking good questions.


By it wouldn't run I meant that the same code that used the Servo.h library wouldn't run with the SoftwareServo.h file even though it compiled without error.  I did make the necessary Servo versus SoftwareServo instantiation changes.  I will take a look at it again and ignore the color.  Thanks.

Go Up