This simple tutorial, show you, how to make a simple electric door opener.

No buttons needed.
When you open the app, the phone automatic connect to your arduino via bluetooth,
and scanning the QR code, then open the door for 3 sec, and app closing, disconnect from arduino.

Arduino code in video description.

Part list:
- Arduino nano v3
- HC-06 Bt module
- Relay modul (1 channel)
- Electrick lock (there is 2 type, im use which need power to open)

Thank you..

<p>please help me sir</p><p>I try to add the PIR and alarm in your project</p><p>but it doesn't work</p><p>my alarm always voiced</p><p>.</p><p>This is my sketch :</p><p>#include &lt;SoftwareSerial.h&gt;</p><p>SoftwareSerial Blue (8, 9);</p><p>relayDoorlock int = 13; // Relay doorlock at pin 13</p><p>statusRelay int = 0; // Status relay starting with 0</p><p>inputPin int = 11; // Choose the input pin (for PIR sensor)</p><p>int pirState = LOW; // We start, assuming no motion detected</p><p>int val = 0; // Variable for reading the pin status</p><p>pinSpeaker int = 10;</p><p>String ReadString;</p><p>void setup () {</p><p>pinMode (inputPin, INPUT); // Declare sensor as an input</p><p>pinMode (pinSpeaker, OUTPUT);</p><p>pinMode (relayDoorlock, OUTPUT); // Set Relay as output</p><p>Blue.begin (9600);</p><p>}</p><p>void loop () {</p><p>statusRelay = digitalRead (relayDoorlock);</p><p>while (Blue.available ()) {</p><p>delay (3);</p><p>char c = Blue.read ();</p><p>ReadString + = c;</p><p>}</p><p>val = digitalRead (inputPin); // Read input value</p><p>if (val == HIGH) {// check if the input is HIGH</p><p>Playtone (300, 160);</p><p>delay (150);</p><p>if (pirState == LOW) {</p><p>// We have just turned on</p><p>Serial.println (&quot;Motion detected!&quot;);</p><p>// We only want to print on the output change, not state</p><p>pirState = HIGH;</p><p>}</p><p>} Else {</p><p>Playtone (0, 0);</p><p>delay (300);</p><p>if (pirState == HIGH) {</p><p>// We have just turned off</p><p>Serial.println (&quot;Motion ended!&quot;);</p><p>// We only want to print on the output change, not state</p><p>// Inside Of The Serial Port</p><p>pirState = LOW;</p><p>}</p><p>}</p><p>if (readString.length ()&gt; 0) {</p><p>Blue.println (ReadString);</p><p>if (ReadString == &quot;esvmxrplOa1KIpyn6BRk&quot;) // Change the Random string</p><p>{</p><p>digitalWrite (relayDoorlock, HIGH); // Turn on the relay for 30 seconds</p><p>digitalWrite (val, LOW);</p><p>ReadString = &quot;&quot;;</p><p>}</p><p>if (ReadString == &quot;CxzJHRO9n1M5OMndUq2T&quot;) // Change the Random string</p><p>{</p><p>digitalWrite (relayDoorlock, LOW); // After 30 seconds, turn off the relay</p><p>digitalWrite (val, HIGH);</p><p>ReadString = &quot;&quot;;</p><p>}</p><p>}</p><p>}</p><p>// Tell Arduino To Play Piezo Buzzer Tone</p><p>// In msecs duration, frequency in hertz</p><p>void Playtone (long duration, int freq) {</p><p>duration * = 1000;</p><p>int period = (1.0 / freq) * 1000000;</p><p>long elapsed_time = 0;</p><p>while (elapsed_time &lt;duration) {</p><p>digitalWrite (pinSpeaker, HIGH);</p><p>delayMicroseconds (period / 2);</p><p>digitalWrite (pinSpeaker, LOW);</p><p>delayMicroseconds (period / 2);</p><p>elapsed_time + = (period);</p><p>}</p><p>}</p>