 Hello and welcome back everyone! In the previous video, we learnt how to interface a servo to Arduino Uno using PictoBlocks and wrote a script to control it using an IR sensor. In today's video, we are going to write a script to open and close a door by controlling a servo with smartphone via Dabble, a project-making application that transforms your smartphone into virtual Arduino sheets. Let's begin! First, open PictoBlocks. Then, connect Uno to your computer via a USB cable. Next, click on the Board button in the toolbar and select its name from the drop-down menu. Then, click on the Connect button and select the appropriate port. Now, let's connect the Bluetooth module to Uno. It will help us pair our smartphone with the board via a Bluetooth. Connect the VCC pin to Uno's 5V pin using a red male-to-female jumper cable. Next, connect the ground pin to Uno's ground pin using a black male-to-female jumper cable. Now, connect the transmit pin TX to Uno's digital pin 2 using a green male-to-female jumper cable. Then, connect the receive pin to Uno's PWM pin 3 using a blue male-to-female jumper wire. Now, let's connect the servo to Uno. Connect the servo's brown wire to Uno's ground pin using a black male-to-male jumper cable. Next, connect the red wire to Uno's VIN pin using a red male-to-male jumper cable. Then, connect the orange wire to Uno's PWM pin 5 using a yellow male-to-male jumper cable. And, we are done. Now, let's write the script to control the servo. Click on the Dabble palette. You'll see that it has blocks for all the different modules of the app, such as LED control, terminal, gamepad, motor control, etc. We are going to give textual commands using the terminal module to control the door. First, let's work on closing the door. It should close if the command given is closed. So, drag and drop an IF block into the scripting area. Then, drag and drop the IS data from terminal block into the hexagonal space of the IF block and write close in the white space. Next, drag and drop the SETSERVO block and set the angle to 0 degrees. Now, to open the door, we must send the command OPEN. Replicate the entire set of blocks and stack the two. Now, write OPEN in the white space of the second IS data from terminal block and change the servo angle to 45 degrees. Add a FOREVER block to the script from the control palette. Drag and drop the SETBORG block above the FOREVER block and set the BORG to 9600. Finally, drag and drop the HEAD block. Our script is now complete. Upload it to UNO by switching to the Upload mode and clicking on the Upload Code button. Now, come see fun part. Peering DABEL with UNO. Install DABEL from Play Store and open it in your smartphone. Next, click on the CONNECT-DISCONNECT icon. A dialog box will appear on the screen asking for permission to turn on the Bluetooth. Click on ALARM. Once you do so, a list of nearby devices will appear. Select your device's name. Now, open the terminal module and you are ready to go. You had as much fun as we did making these tutorials for you. If you have any questions regarding this video, let us know in the comment section below. And if you liked this video, don't forget to give it a thumbs up. We'll meet again sometime. Till then, happy tinkering!