Hi,
I am a newbie and doing a school project to learn more on Arduino.
I have Arduino Uno and ethernet shield. I have connected these two and also have put a formatted micro SD card in the SD card reader of the ethernet shield. I have connected a basic speaker from a local hobby shop on pin 9 and ground.
When I try to run a program at http://www.arduino.cc/en/Tutorial/Tone, it works perfectly fine. The only minor change is that I have used pin 9 instead of pin 8, and this tutorial works perfectly fine for me.
My next goal is to play a simple audio file.
For this, I am trying to use TMRpcm, the same circuit and sample programs giving me buzzing sound on my output. Here is my code, but I believe the issue may be with my circuit itself:
#include <SD.h>
#define SD_ChipSelectPin 4
#include <TMRpcm.h>
TMRpcm tmrpcm;
char mychar;
void setup(){
tmrpcm.speakerPin = 9;
Serial.begin(9600);
if (!SD.begin(SD_ChipSelectPin)) { // see if the card is present and can be initialized:
Serial.println("SD fail");
return; // don't do anything more if not
Serial.println("SD successful");
}
tmrpcm.setVolume(7);
tmrpcm.quality(1);
tmrpcm.play("DRUM1.WAV");
}
void loop() {
Serial.print("In loop"); // This is just a dummy code
delay(5000);
}
Can someone help with point me to right circuit for this, or point me to a simple audio file player?
Thanks.