Forum >DFPlayer Mini autostart (auto reset ?)
ArduinoGeneral

DFPlayer Mini autostart (auto reset ?)

userHead Account cancelled 2020-08-12 05:44:41 1600 Views1 Replies
I recently bought a DFPLayer mini to use it as a nightlight for children with an ATtiny85 and despite a very simple code,
Code: Select all
#include "SoftwareSerial.h"
#include "DFRobotDFPlayerMini.h"
#define TXPIN 1
#define RXPIN 4
#define SERIAL 9600
#define VOLUME 10
#define TIMEOUT 500
SoftwareSerial mySoftwareSerial(RXPIN, TXPIN);
DFRobotDFPlayerMini myDFPlayer;
void setup() {
mySoftwareSerial.begin(SERIAL);
if (!myDFPlayer.begin(mySoftwareSerial)) {
while (true);
}
myDFPlayer.setTimeOut(TIMEOUT);
myDFPlayer.volume(VOLUME);
myDFPlayer.EQ(DFPLAYER_EQ_NORMAL);
myDFPlayer.outputDevice(DFPLAYER_DEVICE_SD);
myDFPlayer.enableLoopAll();
myDFPlayer.start();
}
void loop() {
delay(1800000); // Turn evrything off after 30 minutes
myDFPlayer.disableLoopAll();
myDFPlayer.pause();
myDFPlayer.sleep();
}
The DFPlayer does not start correctly.

I used an arduino nano in ISP to program the Attiny85 and when the upload is complete it starts perfectly. But when I disconnect it, and I turn on the attiny85 in 5v nothing happens. I have to manually reset the attiny85 by putting PIN 1 on GND for 1 second. Now, I would like it to start when powering up.

Could someone please explain to me what I should do about this problem?