Hello !
I don't know why DFPlayer is not working.
I can connect to DFplayer and play 001 file but, I press Triagle Button ..... then not working ...
Plaese teach me !!
My sckech below.
#include "Arduino.h"
#include <SoftwareSerial.h>
#include <DFRobotDFPlayerMini.h>
SoftwareSerial mySerial(53,51); // RX, TX
#include <Wire.h>
#include <PS3BT.h>
#include <usbhub.h>
#ifdef dobogusinclude
#include <spi4teensy3.h>
#endif
#include <SPI.h>
USB Usb;
BTD Btd(&Usb);
PS3BT PS3(&Btd);
DFRobotDFPlayerMini myDFPlayer;
void setup() {
mySerial.begin(9600);
Serial.begin(115200);
#if !defined(MIPSEL)
while (!Serial);
#endif
if (!myDFPlayer.begin(mySerial)) { // Use softwareSerial to communicate with mp3.
Serial.println(F("\r\nUnable to begin:"));
Serial.println(F("1.Please recheck the connection!"));
Serial.println(F("2.Please insert the SD card!"));
while(true);
}
Serial.println(F("\r\nMP3-TF-16P(DFPlayer Mini) online."));
myDFPlayer.volume(10);
myDFPlayer.play(1);
if (Usb.Init() == -1) {
Serial.print(F("\r\nOSC did not start"));
while (1); //halt
}
Serial.print(F("\r\nPS3 Bluetooth Library Started"));
}
void loop() {
Usb.Task();
if (PS3.PS3Connected || PS3.PS3NavigationConnected) {
if (PS3.getButtonClick(PS)) {
PS3.disconnect();
}
if (PS3.getButtonClick(TRIANGLE)) {
Serial.print(F("\r\nTraingle"));
myDFPlayer.play(1);
delay(1000);
}
}
}