In the event that the lock bits have been programmed, have you considered just remaking the program?
I'm assuming that when PTT_IN goes low, the DFplayer is instructed to play the same track each time. PTT_OUT and LED1 outputs go high. BUSY is monitored (after an appropriate delay to allow the track to start playing and BUSY to go LOW) until it goes HIGH. When it does, PTT_OUT and LED1 outputs go LOW again.
If S1 or S2 is pressed, the DFplayer starts playing a particular track and BUSY goes LOW. The 85 is monitoring the busy line and as soon as it sees that the DFplayer is playing, it sets PTT_OUT and LED1 outputs HIGh until such time as BUSY goes HIGH (the track's done), at which time it sets PTT_OUT and LED1 outputs LOW again.
Something like this (which compiles but I haven't tried out on hardware yet, so it probably doesn't work due to a lamebrain mistake or three):
#include <SoftwareSerial.h>
const byte dfPlayerTx = 0;
const byte dfPlayerRx = 1;
const byte pttIn = 2;
const byte pttOut = 3;
const byte ledOut = 4;
const byte busyIn = 5;
SoftwareSerial tinySerial(dfPlayerRx,dfPlayerTx);
const char playTrack1[] = {
'\x7E', '\xFF', '\x06', '\x03', '\x00', '\x00', '\x01', '\xFF', '\xE6', '\xFF'
};
void setup() {
tinySerial.begin(9600);
pinMode(pttIn, INPUT);
digitalWrite(pttOut, LOW);
pinMode(pttOut, OUTPUT);
digitalWrite(ledOut, LOW);
pinMode(ledOut, OUTPUT);
pinMode(busyIn, INPUT);
}
bool oldPttInState = HIGH;
bool isPlaying = false;
void loop() {
if( !isPlaying && oldPttInState == HIGH && digitalRead(pttIn) == LOW ) {
oldPttInState = LOW;
digitalWrite(pttOut, HIGH);
digitalWrite(ledOut, HIGH);
tinySerial.write(playTrack1, sizeof playTrack1);
isPlaying = true;
delay(750); // allow time for BUSY to go LOW
} else if( oldPttInState == LOW && digitalRead(pttIn) == HIGH ) {
oldPttInState = HIGH;
}
if( !isPlaying && digitalRead(busyIn) == LOW ) {
isPlaying = true;
digitalWrite(pttOut, HIGH);
digitalWrite(ledOut, HIGH);
} else if( isPlaying && digitalRead(busyIn) == HIGH ) {
isPlaying = false;
digitalWrite(pttOut, LOW);
digitalWrite(ledOut, LOW);
}
}