I am working on a program where I am controlling an MP3 player by using UART between my MEGA2560 and the MP3 player. The MEGA2560 sends serial commands to the MP3 player when external interrupts are generated on INT4 and INT5 and it all seems to work fine.
When I want to test my program I press the RESET button on the Arduino in order to start the program. However, sometimes the program only starts after pressing the RESET button multiple times. This happens often but not all the time, which is weird.
What do you think could be the reason for this?