Muhammad_Munir
Published © GPL3+

Play Audio in Arduino

How to Play Audio by using Arduino UNO

BeginnerFull instructions provided13,504
Play Audio in Arduino

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
SD card module
×1
BD139 Transistor
×1
Jumper wires (generic)
×1
3 Watt Speaker
×1

Story

Read more

Schematics

sd_card_connection_IartYlHc2y.jpg

Code

Code

Arduino
#include "SD.h"
#define SD_ChipSelectPin 4
#include "TMRpcm.h"
#include "SPI.h"

TMRpcm tmrpcm;

void setup(){
tmrpcm.speakerPin = 9;
Serial.begin(9600);
if (!SD.begin(SD_ChipSelectPin)) {
Serial.println("SD fail");
return;
}

tmrpcm.setVolume(5);
tmrpcm.play("Voyage .wav");
}

void loop(){  }

Credits

Muhammad_Munir

Muhammad_Munir

77 projects • 48 followers
I am Arduino programmer, also expertise in ESP32 and 8266 wifi modules.

Comments