AZ-Delivery
Published © GPL3+

Soundboard with Az-Nano V3 and DFPlayer Mini

A soundboard is a popular tool that is used in particular in television programs or live productions for accompanying acoustic effects.

BeginnerFull instructions provided49
Soundboard with Az-Nano V3 and DFPlayer Mini

Things used in this project

Hardware components

AZ-Nano V3
×1
Dfplayer mini
×1
Microswitch pushbutton range
×1
MicroSD card (32 GB or smaller)
×1
Loudspeaker
×1
Resistance (1 kΩ)
×1
Jumper cable and breadboard
×1
PCB set
Optional
×1
3D-GEDRACKTES HOSE
Optional
×1
Screws + nuts (M3)
Optional
×1
Installation-Button
Optional
×1

Story

Read more

Code

Soundboard.ino

Arduino
#include "Arduino.h"
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"

// Pins
#define DFPLAYER_RX 10
#define DFPLAYER_TX 11

// DFPlayer und Kommunikation initialisieren
SoftwareSerial mySerial(DFPLAYER_TX, DFPLAYER_RX);
DFRobotDFPlayerMini myDFPlayer;

// Array fr Taster-Pins
int buttonPins[] = {2, 3, 4, 5};

void setup() {
  // Serieller Monitor fr Debugging
  Serial.begin(9600);
  
  // DFPlayer starten
  mySerial.begin(9600);
  if (!myDFPlayer.begin(mySerial)) {
    Serial.println("Kein DFPlayer Mini gefunden!");
    while (true);
  }
  Serial.println("DFPlayer Mini bereit!");
  
  // Pins fr Taster definieren
  for (int i = 0; i < 4; i++) {
    pinMode(buttonPins[i], INPUT_PULLUP);
  }
}

void loop() {
  for (int i = 0; i < 4; i++) {
    if (digitalRead(buttonPins[i]) == LOW) {
      Serial.println(i);
      myDFPlayer.play(i + 1); // Sound 1 bis 10
      delay(500);             // Entprellung
    }
  }
}

Credits

AZ-Delivery
21 projects • 3 followers
We are "AZ-Delivery - Your Expert for Microelectronics". Visit our shop with regularly new Blogs and free E-Books.
Contact

Comments

Please log in or sign up to comment.