dirakit communitySulis Priyanto
Published © CC BY

MP3 Player dengan DF Player dan NodeMCU ESP 8266

project ini adalah project untuk membuat player dengan menggunakan NodeMCU ESP8266 dan DF Player Module

IntermediateProtip30 minutes273
MP3 Player dengan DF Player dan NodeMCU ESP 8266

Things used in this project

Hardware components

NodeMCU ESP8266 Breakout Board
NodeMCU ESP8266 Breakout Board
×1
DF Player
×1
MicroSD
×1
Pushbutton switch 12mm
SparkFun Pushbutton switch 12mm
×1
Resistor 1k ohm
Resistor 1k ohm
×1
Breadboard (generic)
Breadboard (generic)
×1
Jumper wires (generic)
Jumper wires (generic)
×20
Speaker: 3W, 4 ohms
Speaker: 3W, 4 ohms
×1

Software apps and online services

Arduino IDE
Arduino IDE

Schematics

Skema Rangkaian

Code

MP3 Player dengan DF Player

Arduino
//based on http://arduiner.blogspot.co.id/2016/06/nodemcu-esp8266-dfplayer-mp3-music-from.html
#include 
#include 
#define PIN_BUSY 14
SoftwareSerial mp3Serial(5, 4); // RX, TX
void setup () {
  pinMode(PIN_BUSY, INPUT);
  Serial.begin (115200);
  Serial.println("Setting up software serial");
  mp3Serial.begin (9600);
  Serial.println("Setting up mp3 player");
  mp3_set_serial (mp3Serial);  
  // Delay is required before accessing player. From my experience it's ~1 sec
  delay(1000); 
  mp3_set_volume (30);
}
void loop () {
  if(analogRead(0) <100){
  Serial.println("Stop");
  mp3_stop ();
  Serial.print("Busy: ");
  Serial.println(digitalRead(PIN_BUSY));
  delay(500);
  Serial.println("play next");
  mp3_next ();
  Serial.print("Busy: ");
  Serial.println(digitalRead(PIN_BUSY));
  delay (12000);
  }
}

Credits

dirakit community

dirakit community

122 projects • 70 followers
Indonesia IoT Community
Sulis Priyanto

Sulis Priyanto

13 projects • 1 follower

Comments

Add projectSign up / Login