I'm about to start building a wireless custom doorbell system using pigpio. It is a three piece system that I will be making. The front doorbell which will communicate via two scripts to two different RPIs. This is done because the chime systems have a display value of two items I want from a visual perspective. One will play an MP3 and the other the clip MP4. In both scripts I need to identify a specific MP3 or MP4 for a button press. For example if I press the button on my front door RPI it should run MP3-1 and MP4-1 and if I press it again MP3-2 and MP4-2. I can run multiple using a random number generator which is not difficult
randint(0,9) if number == 1 etc.
Assign a value to each mp3 or mp4 and if the number is equal to that number then that file will play. I am trying to run a specific file for the first press and a separate file for the second press on the same button. I am not sure how to count the presses and perform a new action with each one. If I can get the system to recognize press 2 then I should be able to run it. I appreciate any insight.