Hi everyone,
I was hoping to not have to resort to this, as I really like to figure stuff out on my own, but I am embarrassed to say that my coding skills are slim to none at this point and still very much in development! I am not new to electrical and electronics in general, but I do not have much experience with coding the arduino. That being said, I have a project that someone (who is definitely more versed than I am) helped me write. With a 4x3 matrix keypad and DFPlayer Mini connected as per the attached diagrams, the final code (which I have also attached) is supposed to allow someone to enter a 4-digit code to activate a relay for 2.5 seconds (this part of the code works fine) and also, if a DIFFERENT 3-digit code is entered, play an mp3 from the DFPlayer Mini (this is the part I am having trouble with). When the final code is uploaded to the board, the serial monitor displays:
i 255
files 0
starting...
initializing...
Com Error 255
volume 0
Com Error 255
files 0
starting...
Then, when the 3-digit code (850) is entered on the keypad, the mp3 track keeps starting over and over and over, about once a second, and the serial monitor just keeps repeating:
Play Mp3 track
Play Mp3 track
Play Mp3......
Play Mp3......
Play Mp3......
Play Mp3......
Play Mp3......
Play Mp3 track
Play Mp3......
Play Mp3......
Play Mp3......
Play Mp3......
Play Mp3 track
Play Mp3......
Play Mp3......
The TX light on the board flashes in corresponding fashion as well...
My goal was to have the mp3 track play ONCE for every time the correct 3-digit activation code was entered. Can anyone help me to identify the troublesome or missing element?? Thank you in advance for your help!
final_code.ino (5.61 KB)