This tutorial will show you how to use a DFPlayer Mini with your ARDUINO to make a Bluetooth controlled Fart machine.
This also could be used other ways by using different sound effect mp3 clips.
Click on video below for full tutorial…
Parts List:
#affiliate links#
Schematic:
The APP:
AIA File
MIT Blocks:
ARDUINO Code:
#define play 6
void setup() {
pinMode(play, OUTPUT);
digitalWrite(play,HIGH);
Serial.begin(9600);
}
void loop() {
if (Serial.available() >= 2 )
{
unsigned int a = Serial.read();
unsigned int b = Serial.read();
unsigned int val = (b * 256) + a;
if (val == 1000)
{
digitalWrite(play, LOW);
delay(100);
digitalWrite(play, HIGH);
}
}
}