 In this video, we are going to see how to control a hardware in dual time using the picked up locks app by programming a two wheel drive robot. The robot should move forward on pressing the up arrow key, it should turn left on pressing the left arrow key, it should turn right on pressing the right arrow key and it should move backward on pressing the down arrow key. First, let's understand the anatomy of the robot. The robot has a chassis upon which the entire body is built. It has two DC motors with wheels attached to make it move. A castor wheel is the third support and an evive and all in one electronics prototyping platform that acts as a brain of the robot. The left motor is connected to evive's motor channel 1 that is M1. The right motor is connected to evive's motor channel 2 that is M2. To find out how to build the robot, go to the link given in the description box. For now, let's understand how the robot will move. On rotating both the wheels in the forward direction, the robot will go forward and on rotating both the wheels in the reverse direction, the robot will go backward. The left wheel is rotated in the reverse direction and the right wheel is rotated in the forward direction then it will turn left. Similarly, if the right wheel is rotated in the reverse direction and the left wheel in the forward then the robot will turn right. To program the hardware in the app and control it in real time, it must have firmware uploaded to it. Switch on evive. If evive's logo appeared on the screen, it indicates that the firmware is already uploaded to it. If not, you must upload it using Pictoblock's TikTok version. Here's how you can do it. Open Pictoblock's on your computer. Connect evive to it using a USB cable. Click on the board button and select evive from the drop-down. Next, click the connect button and select the appropriate serial port. Then click the upload firmware button. Note that uploading the firmware is a one-time process. To connect the robot to the app, we'll need a Bluetooth module. We have our Bluetooth module already connected to evive. Now open the app. Go to MySpace and tap the plus button to start a new program. Next, tap the board icon on the top right corner of the screen. Then select evive from the list. Next, tap the connect icon. A list of nearby Bluetooth devices will appear. You can recognize it either from its name or from the address written at its back. Now that the robot is connected to the app, let's create the script to control it. First, drag and drop an if-else block from the control palette into the scripting area. To sense whether the up arrow key is pressed or not, drag and drop a key pressed block from the sensing palette and place it inside the hexagonal space of the if-else block. If the condition is true, the robot should move forward. That is, both motors should rotate in the forward direction. Thus, from the actuator's palette, drag and drop a run motor block and place it below the if-on. Add another run motor block and select motor 2 from the dropdown. If the down key is pressed, the robot should move backward. Similarly, pressing the right key, it should turn right. And on pressing the left key, it should turn left. If none of the keys are pressed, the robot should stop moving or stay at rest if not already moving. Thus, drag and drop a free motor block for both the motors and place them under its arm. To make these actions execute continuously, drag and drop a forever block around the entire if-else tree. Finally, drag and drop a when-flat-clicked-hat block above the entire script to trigger the execution. Now, switch to the stage, tap the green flag to start the script and use the arrow keys to control your robot. If the robot does not move according to the code, that is, if any motors rotate in the direction opposite to the one selected, then just reverse the connection of that particular motor. That's it for this video. If you liked it, give it a thumbs up and share it with your friends. For more such educational videos, subscribe to STEMpedia and follow us on Facebook, Instagram and Twitter. Bye-bye.