Arduino to bluetooth final project. PLEASE HELP ASAP!

Ok so for my final project for a class I am creating a Bluetooth door unlock-er. When we get close to the door it activates a servo connected to a little arm we created. When the arm moves it either locks or unlocks a standard deadbolt lock. The only problem we have encountered is our bluetooth dongle. We have 2 to use, an ASUS wireless bluetooth device S/N 731001005407. An a MSI 3X S/N B070603000261. We are using an Arduino Redboard and a Sparkfun USB HostShield. We havent been able to use the code to activate the bluetooth. We downloaded the hostshield library from the sparkfun website and set up the hostshield. Now what sort of code should we use for the bluetooth or where could we find some codes? If anyone could help that would be amazing. Thanks

seanman555:
Ok so for my final project for a class I am creating a Bluetooth door unlock-er. When we get close to the door it activates a servo connected to a little arm we created.

Explain more about the opening. You want to open the door with a bluetooth device, maybe an android app?

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

Are you using two Arduinos - one to transmit and another to receive and to control the lock?

Post your code.

I doubt if you will get Bluetooth to wok satisfactorily just based on the changing distance beween transmitter and receiver. Your transmitter needs to send a message that the receiver recognizes as "unlock the door please"

...R

Robin2:
I doubt if you will get Bluetooth to wok satisfactorily just based on the changing distance between transmitter and receiver.

I believe this can be done, and Cantin's "no code" alluded to by Pancake might be the way. One bluetooth constantly polls for a specific other and auto-connects when it is in range. No message is required, and possibly no Arduino either.

All this is on the HC-05 bluetooth, and I don't know how this relates to the OP's Asus and Redboard stuff.

Nick_Pyner:
auto-connects when it is in range.

I imagine that would be a quite long distance and also that it may vary from time to time due to external arrangements - such as whether or not there are obstacles for the signal.

The OP has not said what sort of distances he is interested in.

There is also the risk that the lock will be opened just because you are in range even though you have not intended for it to open. You would not wish your front door to unlock while you were standing in the garden trying to persuade a thief to leave the premises.

...R

Robin2:
There is also the risk that the lock will be opened just because you are in range even though you have not intended for it to open. You would not wish your front door to unlock while you were standing in the garden trying to persuade a thief to leave the premises.

I guess somebody will invent a power switch to take care of that. But I don't suppose practicality is high on the list of priorities anyway.