im doing a project with arduino mega (2560) and two HC-SR04 sonar sensors and a SD module.
The purpose of my project is to play music(.wav) from the SD card which can play different .wav according to the distance.
Im new with arduino and imm not good in this programming, i have attached my code which i tried with 1 sonar and it needs to play different .wav with distance.
the issue here is i have asigned delay until a single wav plays. after only it gets the next signal.
i need it as that can continuously get signal without the delay to wait to play . and also according to 2 sonar have to play 2nd wav while the 1st wav plays...
please help me to solve this. i have to finish this project within a week. please kindly help me. im Thankful to you
wav_with_1snr.ino (2.33 KB)