stevenmt / wavehc

Automatically exported from code.google.com/p/wavehc
0 stars 0 forks source link

Not working on Arduino Due (Duemilanove) #2

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Running the example daphc on the programming port for Due

What is the expected output? What do you see instead?
daphc.pde: In function 'void play(FatReader&)':
daphc.pde:105:62: error: 'strncmp_P' was not declared in this scope

What version of the product are you using? On what operating system?
wavehc20110919.zip

Please provide any additional information below.

Original issue reported on code.google.com by ftel...@gmail.com on 16 Nov 2014 at 12:05

GoogleCodeExporter commented 9 years ago
Wavehc is not supported on Due.

Original comment by Bill.Gre...@gmail.com on 16 Nov 2014 at 2:13

GoogleCodeExporter commented 9 years ago
Is there any other way to use the Adafruit Wave Shield for Arduino Kit - v1.1 
for Arduino Due? Another library? Or is there any way to read the files from 
the SD card to the Due?

Original comment by ftel...@gmail.com on 16 Nov 2014 at 2:17

GoogleCodeExporter commented 9 years ago
The Adafruit Wave Shield does not connect to the Due SPI connector so SD.h 
won't work.

I recently added Software SPI to SdFat.  I tried the SdFat-beta posted here:

https://github.com/greiman/SdFat-beta

I edited SdFatConfig.h to make Software SPI the default for Due and tested with 
a 1.1 Wave Shield using the SdFat bench example.  The result for read is:

Starting read test, please wait.

read speed and latency
speed,max,min,avg
KB/Sec,usec,usec,usec
391.40,2593,1284,1306

This would be fast enough to play wav files.  

You can't use the audio software from wavehc since it only works on AVR. You 
would need to develop a timer based ISR to do the audio on Due.

I don't know if the audio hardware of the wave shield can be used with Due.  It 
depends on the DAC working with 3.3V signals.

To use Software SPI on Due I set these defines in SdFatConfig.h

/**
 * Set USE_MULTIPLE_SPI_TYPES nonzero to enable the SdFatSoftSpi and
 * SdFatLibSpi classes. SdFatSoftSpi uses software SPI and SdFatLibSpi
 * uses the standard Arduino SPI library.
 */
#define USE_MULTIPLE_SPI_TYPES 1
/**
 * Set DUE_SOFT_SPI nonzero to use software SPI in the SdFat class
 * on Due Arduinos.  Set the soft SPI pins below.
 */
#define DUE_SOFT_SPI 1

Original comment by Bill.Gre...@gmail.com on 16 Nov 2014 at 5:07