📬❄️📦Adafruit Holiday Shipping Deadlines 2019: Please place all UPS 3 Day orders by 11am ET Friday December 13 📬❄️📦
0

VS1053 - Trouble getting examples to work
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Re: VS1053 - Trouble getting examples to work

by syonker on Thu Oct 30, 2014 3:20 pm

Hi Gang!

As always you folks have outstanding information, and are prompt! Thanks for the explanation of Pin 53...good to know.

So after all of this, I went back to the drawing board again and did the following:

TEST: Ditched the Mega 2560 and put a *regular* Uno (R3) on instead, and wired exactly as before.
RESULTS: Same failure.

TEST: Switched the 2GB SD card (probably an offshoot store brand) for a "SanDisk Proper" 8GB (smallest I could get) chip.
RESULTS: PASS!

So all along this stupid problem has been caused by.....wait for it.....a bad SD card. If I'd just had a spare to try earlier (I read that it could be the case in an earlier forum entry, but since it had worked before it didn't register).

Not that I'm going to do this at *this* point, but I may try formatting it with Win8.1/FAT32 and try again to see if there's something going on with the newer OS in relation...but for now, on to my project.

Oh well, live and learn....thanks for all the assistance.

-S
syonker
 
Posts: 12
Joined: Tue Mar 04, 2014 9:24 am

Re: VS1053 - Trouble getting examples to work

by adafruit_support_bill on Thu Oct 30, 2014 5:17 pm

Glad you got it working finally.

I may try formatting it with Win8.1/FAT32

We recommend sticking with the SD association formatter. All of the major OS format utilities have been known to take liberties with the SD standard and these sometimes cause problems for the SD library.

adafruit_support_bill
 
Posts: 75298
Joined: Sat Feb 07, 2009 10:11 am

Re: VS1053 - Trouble getting examples to work

by syonker on Fri Oct 31, 2014 7:35 am

Great advice...I will try that formatter in a little while with the old chip and post the results of that test.

For those interested and following this topic, the SD Formatter can be found at the following URL: /https://www.sdcard.org/downloads/formatter_4/

On a related note (and I'm *guessing* this has been answered elsewhere in the forums), has anyone made a spectrum analyzer with a 60-NeoLight Strip (or similar) and the VS1053 from which I might *borrow* some code?

-S
syonker
 
Posts: 12
Joined: Tue Mar 04, 2014 9:24 am

Re: VS1053 - Trouble getting examples to work

by adafruit_support_bill on Fri Oct 31, 2014 7:45 am

There are a few spectrum analyzer projects around. Here are a couple from the Learning System
https://learn.adafruit.com/piccolo/code
https://learn.adafruit.com/fft-fun-with ... m-analyzer

And VLSI has a spectrum analyzer plug-in here: http://www.vlsi.fi/en/support/software/ ... ugins.html

adafruit_support_bill
 
Posts: 75298
Joined: Sat Feb 07, 2009 10:11 am

Re: VS1053 - Trouble getting examples to work

by syonker on Fri Oct 31, 2014 7:57 am

Thanks for the Spectrum Analyzer links! SUPER helpful - on the approach to the finality of this project, and this will be useful.

UPDATE: I ran the SD Formtter (both quick, and full) on the old 2GB chip and loaded the test tracks on there, but neither one worked, so this looks like something odd with the chip.

Go figure.

-S
syonker
 
Posts: 12
Joined: Tue Mar 04, 2014 9:24 am

Re: VS1053 - Trouble getting examples to work

by adafruit_support_bill on Fri Oct 31, 2014 8:19 am

so this looks like something odd with the chip.

There is a surprising amount of timing variation between SD cards. Sometimes it is possible to get problem cards to work by slowing down the SPI clock. But that is a hassle. And if you slow it too much, can interfere with playback. I find it simpler just to by good cards from reputable sources.

Watch out for counterfeits of name-brand cards! I got a batch of bogus SanDisk cards a while back. They were slower than the real ones, and turned out to be only half of the advertised storage capacity too.

adafruit_support_bill
 
Posts: 75298
Joined: Sat Feb 07, 2009 10:11 am

Re: VS1053 - Trouble getting examples to work

by syonker on Fri Oct 31, 2014 1:01 pm

Dang. Looks like the VS1053 combined with the 60-strand neopixel array is just *too* much for the R3 Arduino. I never got it to successfully work on the Mega 2560, so I have to bail on the audio portion of the costume. Oh well...another time perhaps.

Grrr, was *really* hoping for a win on this one.

-S
syonker
 
Posts: 12
Joined: Tue Mar 04, 2014 9:24 am

Re: VS1053 - Trouble getting examples to work

by syonker on Fri Oct 31, 2014 6:22 pm

What this has all been building up to:...

This is "Emmet", also called, "The Special", who is the lead character in, "The Lego Movie". Or rather, it's a costume of Emmet for Halloween minus a long-sleeved blue shirt and a kid.

Regardless of the audio "wow factor", the end came out pretty well. Take note of the red, square jar in the lower left. This is the "Piece of Resistance" (which in the film is actually a superglue cap that in at least two scenes glows and shimmers, and says semi-random things like something "other-worldly"). Like the one in the movie, this one too will pulsates, glow , shimmer, etc. like something other-worldly. We always try to work in something with lights, and with retro-reflective material (the stripes on the workman's suit) for safety reasons, and the NeoPixels have been heavy-hitters for us over the past few years.

I couldn't do the kinds of things I do for events like this without the help of Adafruit, so a hearty "Thank You!"...both for the fantastic and innovative products you continually bring to market, and for the amazing level and quality of technical help that is provided.

-S

Image
syonker
 
Posts: 12
Joined: Tue Mar 04, 2014 9:24 am

Re: VS1053 - Trouble getting examples to work

by adafruit_support_bill on Sat Nov 01, 2014 6:09 am

Awesome costume! Thanks for the photo

adafruit_support_bill
 
Posts: 75298
Joined: Sat Feb 07, 2009 10:11 am

Re: VS1053 - Trouble getting examples to work

by DracoCarathyr on Mon Nov 03, 2014 10:37 pm

When I import the library, I just get a blank line inserted at the beginning of the sketch. Anybody know how to fix this? I am terrible with code, so I have no idea what to do

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

Re: VS1053 - Trouble getting examples to work

by adafruit_support_mike on Tue Nov 04, 2014 5:25 pm

What library are you trying to include?

adafruit_support_mike
 
Posts: 59692
Joined: Thu Feb 11, 2010 2:51 pm

Re: VS1053 - Trouble getting examples to work

by DracoCarathyr on Tue Nov 04, 2014 10:54 pm

The Adafruit_VS1053 library. I haven't tried the example sketches.

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

Re: VS1053 - Trouble getting examples to work

by adafruit_support_mike on Wed Nov 05, 2014 3:35 am

You don't run the VS1053 library directly.

It just gives you a set of pre-written functions that make the VS1053 do specific things. You use those functions to build programs that do something specific.

Take a look at the examples.. they'll give you an idea of how the library is included and the functions are used.

adafruit_support_mike
 
Posts: 59692
Joined: Thu Feb 11, 2010 2:51 pm

Re: VS1053 - Trouble getting examples to work

by DracoCarathyr on Wed Nov 05, 2014 11:11 am

So using the import library tool will not work?

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

Re: VS1053 - Trouble getting examples to work

by adafruit_support_mike on Thu Nov 06, 2014 1:36 am

If you select the Adafruit_VS1053 item from the "Import Library" popup menu, it should add the line:

Code: Select all | TOGGLE FULL SIZE
#include <Adafruit_VS1053.h>

to your sketch. That line is what tells the compiler to read the file in question and add the additional functions when it compiles the sketch.

I don't know the Arduino IDE's internals in any detail, but it seems to read the sketchbook/libraries folder when it launches and adds the name of any subfolder that meets its naming rules (no hyphens in the name, mostly) to the "Import Library" popup. It doesn't actually check to see if you have a library file (usually with the extension .cpp) or a header (usually with the extension .h).

If you don't get any text when you select the Adafruit_VS1053 item, you probably don't have a header file in the directory. Take a look at this tutorial for detailed information about installing and using Arduino libraries:

https://learn.adafruit.com/adafruit-all ... -libraries

adafruit_support_mike
 
Posts: 59692
Joined: Thu Feb 11, 2010 2:51 pm

Please be positive and constructive with your questions and comments.