The Serial port on your PC? Then that's a PC problem.
Your code uses both SoftwareSerial and Serial2. Which one stops working?
Which Arduino? Why are you using SoftwareSerial on an Arduino which has more than one Serial port?
The Serial port on your PC? Then that's a PC problem.
Your code uses both SoftwareSerial and Serial2. Which one stops working?
Which Arduino? Why are you using SoftwareSerial on an Arduino which has more than one Serial port?