Volume Control for Waveshield

For other supported Arduino products from Adafruit: Shields, accessories, etc.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
deborah1
 
Posts: 2
Joined: Mon Feb 04, 2013 2:29 pm

Volume Control for Waveshield

Post by deborah1 »

Hi There,

I've been happily playing with my waveshieds for a couple of months but now that I'd like to incorporate software volume control I am running into the most basic problem of the example code not compiling. Here's the error message:

C:\Program Files\arduino-1.0.4\libraries\AF_Wave\AF_Wave.cpp:2:22: error: WProgram.h: No such file or directory

Any suggestions? I downloaded the AF_Wave library and sample code from the most recent tutorial site.

Thanks

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

Re: Volume Control for Waveshield

Post by adafruit_support_bill »

AF_Wave is an old library that is no longer supported. It does not work with SDHC cards which are the most common variety these days. We recommend using WaveHC.

Since the library pre-dates Arduino 1.0, it is still using the older includes. You should still be able to run it in older versions like Arduino-0023. To make it compile in current versions of the Arduino IDE, you can try changing this in AF_Wave.h.

Code: Select all

#include "WProgram.h"
#include <pins_arduino.h>
to this:

Code: Select all

#if defined(ARDUINO) && ARDUINO >= 100
  #include "Arduino.h"
#else
  #include "WProgram.h"
  #include <pins_arduino.h>
#endif

deborah1
 
Posts: 2
Joined: Mon Feb 04, 2013 2:29 pm

Re: Volume Control for Waveshield

Post by deborah1 »

Thanks for the suggestion. I couldn't get it to work but have had immediate success using the WaveHC route!

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

Return to “Other Arduino products from Adafruit”