VS1053 - Trouble getting examples to work

Adafruit Ethernet, Motor, Proto, Wave, Datalogger, GPS Shields - etc!

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
User avatar
DracoCarathyr
 
Posts: 20
Joined: Mon Nov 03, 2014 8:58 pm

Re: VS1053 - Trouble getting examples to work

Post by DracoCarathyr »

The thing I am having trouble with is that I have the header file in the Library folder for the IDE, but I try to import it it just gives me a blank line. I opened one of the sketches it says there is not a header file for Adafruit_VS1053, even though it has

Code: Select all

# include <Adafruit_VS1053.h>
. I followed the direction to import a library, too.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: VS1053 - Trouble getting examples to work

Post by adafruit_support_mike »

You have a space between the '#' and the 'include'. You need to remove that.

'#include' is a single keyword.

User avatar
DracoCarathyr
 
Posts: 20
Joined: Mon Nov 03, 2014 8:58 pm

Re: VS1053 - Trouble getting examples to work

Post by DracoCarathyr »

The header file is in the directory, but when I compile or try to import the library it either says it is not in the directory or just creates a blank line

This is the error message:

Arduino: 1.5.8 (Windows 7), Board: "Arduino Mega or Mega 2560, ATmega2560 (Mega 2560)"

player_simple.ino:17:29: fatal error: Adafruit_VS1053.h: No such file or directory
compilation terminated.
Error compiling.

This report would have more information with
"Show verbose output during compilation"
enabled in File > Preferences.
Attachments
vs1053 sketch problem.png
vs1053 sketch problem.png (131.77 KiB) Viewed 1256 times

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: VS1053 - Trouble getting examples to work

Post by adafruit_support_mike »

Have you restarted the Arduino IDE since you put the Adafruit_VS1053 library in sketchkook/libraries?

The IDE only looks for headers at startup, so any libraries you add while it's running remain unseen, even though the files are where they're supposed to be.

Also make sure you've trimmed the '-master' off the name of the directory that contains the .h and .cpp files. The IDE will ignore any directory whose name contains anything other than letters, numbers, or underscores.

User avatar
DracoCarathyr
 
Posts: 20
Joined: Mon Nov 03, 2014 8:58 pm

Re: VS1053 - Trouble getting examples to work

Post by DracoCarathyr »

Apparently when I unzipped it there was an extra folder (the library was in a folder labeled "Adafruit_VS1053" which was in a folder of the same name) that I added to the library. It seems to work now. Funny that that was all it was.

User avatar
adafruit_support_mike
 
Posts: 67454
Joined: Thu Feb 11, 2010 2:51 pm

Re: VS1053 - Trouble getting examples to work

Post by adafruit_support_mike »

The Arduino IDE is kind of picky about things like that.

It isn't bad to work with once you've learned its quirks, but it does take a bit of getting used to.

Glad to hear you got it working. Happy hacking!

User avatar
DracoCarathyr
 
Posts: 20
Joined: Mon Nov 03, 2014 8:58 pm

Re: VS1053 - Trouble getting examples to work

Post by DracoCarathyr »

Thank you

User avatar
lunes
 
Posts: 7
Joined: Sun Aug 31, 2014 2:34 am

Re: VS1053 - Trouble getting examples to work

Post by lunes »

Does this breakout need 5V or can I power it with 3.3V?

User avatar
adafruit_support_bill
 
Posts: 88093
Joined: Sat Feb 07, 2009 10:11 am

Re: VS1053 - Trouble getting examples to work

Post by adafruit_support_bill »

The board will run on 3.3v also.

Locked
Please be positive and constructive with your questions and comments.

Return to “Arduino Shields from Adafruit”