Pages: [1]   Go Down
Author Topic: Help Installing Library  (Read 1279 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi,

I'm using an Arduino Uno with version 0022 of the software.  It's installed on a Windows Vista SP2 machine and, up until this morning, everything has worked as expected. I'm new to the Arduino but am pretty experienced with PCs and software. (I write software for a living).

I've been trying to install some libraries for use on my board.  This morning I installed the Tone library (from http://code.google.com/p/rogue-code/wiki/ToneLibraryDocumentation) without any problems.  I copied this into the C:\Users\MyUserName\Documents\arduino-0022\arduino-0022\libraries folder on my machine.  The Tone library appeared in the Import Library list as expected and loaded correctly when selected.

Later I tried to install the TimeDate library from http://www.arduino.cc/playground/Code/Time (again by copying to the C:\Users\MyUserName\Documents\arduino-0022\arduino-0022\libraries folder on my machine).

This would not appear in the Import Library list and compiling fails with a selection of error messages!

Now neither the TimeDate nor the Tone libraries appear in the Import Library list. (Odd that the Tone library should disappear when I haven't removed it).

I have also tried copying the Sketchbook folder as described at http://www.arduino.cc/en/Reference/Libraries without success.

If anyone could offer any advice on:

1) Why the Tone library has disapeared?
2) Where I'm going wrong installing the other library?

If I've missed any information you need to know please let me know.

many thanks.


« Last Edit: July 07, 2011, 07:21:53 am by day26 » Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

To add to my question above I've just tried adding (any) one of the inbuilt libraries and got the following error:

core.a(main.cpp.o): In function `main':
D:\Software\Arduino\arduino-0022\hardware\arduino\cores\arduino/main.cpp:7: undefined reference to `setup'
D:\Software\Arduino\arduino-0022\hardware\arduino\cores\arduino/main.cpp:10: undefined reference to `loop'

I'm just about to try installing and reinstalling the software (just in case!)
Logged

0
Online Online
Shannon Member
****
Karma: 220
Posts: 12682
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You should have just installed it in sketchbook/libraries/  - libraries that are built into the Arduino software itself are compiled differently I believe. 

In general putting code into the Arduino distribution means you'll lose it when you next upgrade!
Logged

[ I won't respond to messages, use the forum please ]

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 227
Posts: 14007
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

When installing libraries - ALL occurences of the IDE needs to be restarted, did you do that?
Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Yes, all instances of the IDE were restarted.

Also, the machine has been restarted several times.

I reinstalled the IDE last night and again copied across the libraries - again, they do not show up in the IDE.

Logged

Global Moderator
Netherlands
Online Online
Shannon Member
*****
Karma: 227
Posts: 14007
In theory there is no difference between theory and practice, however in practice there are many...
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

How many libraries do you have ?  - don't know if there is a limit, just thinking out loud ...

The pattern I see is that Time << Tone (alphabetically) are there other libs missing beyond the letter T?


Logged

Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Apologies for delay in replying to previous post but I've been away for a few days.

The libraries I'm trying to install are the first two after a default software installation so I wouldn't think that that would be a problem so soon.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17305
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Are you sure you are placing the libraries in the correct place and format?

Here is how my contributed library looks like, note that this library directory is located in the arduino sketch folder not anywhere in the arduino core structure.

Quote
C:\Documents and Settings\Primary Windows User\My Documents\Arduino\libraries

15 Folders:

Button
DS1307
EasyTransfer
Flash
FreqCount
FreqMeasure
MsTimer2
NewSoftSerial
Playtune
SoftEasyTransfer
Streaming
String
Tone
WString
__MACOSX


0 Files:

And here are the contents of my Tone library:

Quote
C:\Documents and Settings\Primary Windows User\My Documents\Arduino\libraries\Tone

2 Folders:

examples
Tone


3 Files:

keywords.txt
Tone.cpp
Tone.h

See if your folder structure is similar. You will know you have it correct when you can in the IDE click on sketch/import Library and see the library listed in the lower 'contributed' section of the listing shown.

Lefty
Logged

Offline Offline
Newbie
*
Karma: 0
Posts: 13
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Thanks for your reply Lefty.

Firstly, my Vista machine maps the path to C:\Users\[Username]\Documents\Arduino\Libraries

Having said that, something strange has happened.  When I started up my machine today and opened the IDE the libraries were visable and worked perfectly.

Nothing has been added, removed or changed since I shut down the machine last night when the libraries weren't working.

As I may have said above, I work as a software developer and am no stranger to weird things happening with Windows machine configurations so I'm writing this off as a Windows quirk.

If I figure out what happened then I'll post again so others can benefit.

Many thanks to everyone who posted.
Logged

Left Coast, CA (USA)
Offline Offline
Brattain Member
*****
Karma: 362
Posts: 17305
Measurement changes behavior
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Quote
Firstly, my Vista machine maps the path to C:\Users\[Username]\Documents\Arduino\Libraries

That needs to be libraries (as in lower case l) for the IDE to find the folder.


Lefty
Logged

Washington
Offline Offline
God Member
*****
Karma: 39
Posts: 809
Firefox & Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Case name does not differentiate in Windows. that means fopen, open and readdir don't care so it shouldn't matter.
Logged

Avoid throwing electronics out as you or someone else might need them for parts or use.
Solid state rectifiers are the only REAL rectifiers.
Resistors for LEDS!

Global Moderator
Boston area, metrowest
Offline Offline
Brattain Member
*****
Karma: 549
Posts: 27418
Author of "Arduino for Teens". Available for Design & Build services. Now with Unlimited Eagle board sizes!
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I struggle with this also. I have my IDE at c:/program files/arduino-0021.
When I download stuff, windows vista keeps putting it in some virtual storage folder, and makes it difficult to get it in the program files/arduino area.
freakin' windows ...  I really miss the older versions before it was assumed we were all idiots and needed to be spoon fed everything.
Logged

Designing & building electrical circuits for over 25 years. Check out the ATMega1284P based Bobuino and other '328P & '1284P creations & offerings at  www.crossroadsfencing.com/BobuinoRev17.
Arduino for Teens available at Amazon.com.

Pages: [1]   Go Up
Jump to: