I am using Software Serial for communication between an arduino nano and an adafruit sound fx board. I am trying to implement a 2 player game where each player has their own push button. Each time a player presses the button a message is sent to the sound fx board to play a sound. This works fine so long as the players don't press their buttons at the same time (or within ~40ms). When both players hit their push buttons at the same time software serial tries to transmit while simultaneously receiving. Looking at the Software Serial documentation page it mentions that it does not have this capability. Is there a function that checks to see if Software Serial is in the process of receiving information? Such a flag would allow me to hold off transmitting a new message.
I think that SoftwareSerial has nothing to do with your problem.
The one that you need - set the flag when the program receive the signal from the first user and do not react to the second.
Thanks for all the replies. It turns out that the adafruit function 'playTrack' for the playing a sound waits for a reply from the sound board. It was this delay that caused my program to stall for half a second. To fix the issue I just avoided the function and sent the serial message myself. I also had to use the Tx/Rx pins on the nano because Software Serial seems make my LEDs go haywire.