0

I have been working on a project building a robot and using my own custom-built libraries to control it. However after converting all my old code into libraries Arduino can't find them.

Everything thing I have seen says to save them in the 'libraries' folder in with the sketches in MyDocuments and to reboot the Arduino Environment so it will recognize them.

Did that.

It even recognizes them in the sketch menu as libraries that can be imported. However, when I click on them to be included, a new blank line is entered into the sketch instead of an include statement. Perhaps this is some clue? I am really out of ideas at this point as to what I have done wrong.

6
  • Which version of the IDE? What is the library name? What are the file names in this library? Personally I never use the "import library" menu item, I simply type the include in myself.
    – Nick Gammon
    Jul 28, 2015 at 20:34
  • its 1.6.3, its a library I made myself called Motor.h and I actually did write the include statement in myself too. I thought maybe I was doing it wrong somehow. The files are just Motor.h and Motor.cpp but it doesn't find them even though they are in the libraries folder
    – Caleb
    Jul 29, 2015 at 3:30
  • 1
    Are they in a folder, called Motor which is itself inside the libraries folder?
    – Nick Gammon
    Jul 29, 2015 at 3:39
  • yes it is. the libraries folder in with all my saved sketches not the one in the C drive (though I tried adding it to that one too).
    – Caleb
    Jul 29, 2015 at 23:18
  • 1
    It should not be in the Arduino distribution folder (the one with the Arduino program in it). It should be in libraries in the sketchbook folder.
    – Nick Gammon
    Jul 30, 2015 at 5:23

2 Answers 2

1

I wanted to vote for the answer from trpropst, but I don't seem to be authorised to do so.

I had the same problem as Caleb. It turned out that the problem was that the user library directory /Arduino/libraries/ contained a library with a missing ".h" file. The Arduino IDE stopped loading the user libraries when it reached the library with the missing ".h" file.

i.e.

the folder "/Arduino/libraries/libraryA" existed

the file "/Arduino/libraries/libraryA/libraryA.h" existed

but the file "/Arduino/libraries/libraryA/libraryA.h" had an include

"#include <libraryB>" for which the folder "/Arduino/libraries/libraryB" existed but it did not contain a file "/Arduino/libraries/libraryB/libraryB.h"

I was trying to compile a program using libraryC, but not using libraryA or libraryB. I guess the lesson is do not develop libraries using the production tool chain.

edited to print < and > correctly

0

I had the same symptom described here. In my case, there was a broken link in my libraries directory. Removing that link made the problem go away. It seems that you need to be careful that there is nothing in that directory that could cause the IDE to have difficulty parsing it.

I saw this on a Linux environment (the original poster didn't specify the OS but the reference to "MyDocuments" sounds like Windows). The link I referenced was a symbolic link I had created to a custom library that I subsequently moved, breaking the link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.