AT Commands don't work

A little while ago i had a bluetooth module (HC05) and an arduino mega 2560 , i tried using writing some AT commands onto the module (when i plugged in the arduino i disconnected the vcc of the module , pressed the button on it and while pressing i plugged in the vcc of the module and it went into AT mode - it started blinking every 2 seconds) and it worked fine , i was able to change the module's name and password and everything. Recently without changing the arduino or the module , i tried the same method and it didn't work ! (even used the same script for the commands) , can anyone help me find out why this doesn't work ? i tried changing the arduino and the module itself , and it still doesn't work.

  • The script i used for the AT commands is attached below.

AtCommands.ino (320 Bytes)

Clearly, if it worked before, and the gear is the same, about all that is left is that you have failed to follow instructions. This may be because they are unclear. Check here

http://www.martyncurrey.com/arduino-with-hc-05-bluetooth-module-at-mode/