Pages: [1]   Go Down
Author Topic: Library import not working?  (Read 765 times)
0 Members and 1 Guest are viewing this topic.
0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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?

Icek
Logged

Global Moderator
Dallas
Online Online
Shannon Member
*****
Karma: 210
Posts: 13037
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
but it wouldn't run
Are you saying the IDE crashed?
Logged

Seattle, WA USA
Offline Offline
Brattain Member
*****
Karma: 642
Posts: 50366
Seattle, WA USA
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.

Quote
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"?
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 59
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

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.
Logged

Pages: [1]   Go Up
Jump to: