HC-05 bluetooth module code to setup as master

Thanks to the help of the forum and expecially of Nick_Pyner i'm quite sure that HC-05 is the module for me :) Now..i want to configure it as master. I'd like that i turn it on and it has to find my bluetooth slave (i think i have to put the bluetooth ID of my slave in the sketch) and connect to it. I know that the slave i have to use has a RN-42 bluetooth module so i suppose that using AT commands i can do it..do you agree?