I have a Velleman KA02 audio shield. When I use this shield on an Arduino UNO R3 with this sample code, it works. And by "work" I mean when I interact with the Serial Monitor
(by pressing Y
, for example), I hear the playback.
However, if I place this audio shield on a Mega 2560 R3, the shield no longer works (pressing Y
does nothing). I read about the SPI library, and the document seems to suggest that MISO
, MOSI
, SCK
and SS
are different for the Uno vs the Mega. For the Uno,
- MOSI: 11
- MISO: 12
- SCK: 13
- SS: 10
and the article is consistent with the constants defined in the ISD1700.h file. For the Mega,
- MOSI: 51
- MISO: 50
- SCK: 52
- SS: 53
I can modify ISD1700.h
for use with the Mega easy enough. However, I do not think I can just sit the audio shield right on top of the Mega with the modified code and have it work. I used some (male to female) jumper wires to connect from the Mega pins 50, 51, 52, 53 to the audio shield pins 12, 11, 13, 53 (correspondingly). Additionally, I have jumper wires connecting the power and ground from the Mega to the audio shield. What works is that the audio shield has power and I am able to press the physical buttons on the audio shield to record and playback. What does not work is that when I enter Y
in the serial monitor to force a playback, although the character is read and the switch
case is reached, the playback never happens.
Any ideas on what I am doing wrong? On the Velleman site, they seem to suggest that this audio shield only works with the Uno, but the Illustrated Assembly Manual says that the audio shield should work with the Mega.
ISD1700 chip(10);
toISD1700 chip(53);