Arduino uno not responding to AT commands

Hi all,
I am trying to run the simple AT command for arduino UNO with bluetooth module HC05,
But it is not responding to any command
Connections are set as instructed in

code is also same as given in the above link.

Connection details -
Arduino pin 11 ---- HC 05 RX
Arduino pin 10 ---- HC 05 TX
Arduino pin 9 ---- HC 05 key ( config g1 pin 2 )
Arduino VCC (5 v) --- VCC ( 5 v )
Arduino GRD --- HC 05 GRD

pinMode(9, HIGH)

Kindly let me know how to troubleshoot this ?

It looks like that code is using "Way 1" of getting into AT command mode and that way DOESN'T set the baud rate to a known value. Instead you should use "Way 2" so the baud rate is forced to 38400. To do that, jumper the "Key" pin to the "Vcc" pin.

You may also need to set the line terminator characters in the menu at the bottom of the Serial Monitor window. If the chip is looking for a line ending and is not getting one it would not respond.

From the AT commands manual:

"1. How to get to the AT mode.
Way 1:
Step 1: Input low level to PIN34.
Step 2: Supply power to the module.
Step 3: Input high level to the PIN34. Then the module will enter to AT mode.
The baud rate is as same as the communication time, such as 9600 etc.

Way 2:
Step 1: Connect PIN34 to the power supply PIN.
Step 2: Supply power to module (the PIN34 is also supplied with high level since the PIN34 is connected with power supply PIN). Then the module will enter to AT module. But at this time, the baud rate is 38400. In this way, user should change the baud rate at the AT mode, if they forget the communication baud rate.

Thank you john,
Infact it is working fine without any changes , the problem was a lose connection,
several times I have checked the connection but later i came to know few wires were loosely connected.

Is there any simulator for arduino ? so that first I check in simulator and if everything works fine in simulator then it must work in real.