Two HC-05 modules won't stay paired

Excellent description of your code. Show your code and draw your circuit.