 Hello everyone! Welcome to Stampedia's world of DIY, where every beginner, educator or hobbyist can ideate, create and innovate. In the previous video, we saw step by step making and circuitry of the robotic arm. We also calibrated it and controlled it in real time with a computer using pictoblocks. You can check it out by clicking on the card above. In this video, we will learn how to make our robotic arm autonomous, the industrial robotic arms. Sorting of objects in industries is carried out by various robots with specific end effectors. Just like those robotic arms sort objects in industries, we will automate our robotic arms such that it picks up the object in front of it and search them according to their color. We will be using an ultrasonic sensor to detect the presence of the block and an IS sensor to detect the color of the blocks. Before moving on, don't forget to subscribe to Stampedia and hit the bell to never miss on more such exciting projects. Let's begin by making three areas. One to lift the objects from and the other two to place them after sorting. First, make an area of 20 cm by 10 cm to pick up the blocks and also to house our sensors. Next, make two areas of 10 cm by 10 cm each for placing the white and black blocks. Now that the areas are made, let's attach the sensors. Take an ultrasonic sensor and mount it to the 10 cm wall in the pick up zone using a double sided tape. Let's attach the IS sensor. Now, let's move on to the connections. First, connect a wires plus 5 volt and ground pins to the breadboard. Next, connect jumper wires to the sensors. Insert the plus 5 volt and ground pins of the ultrasonic sensor in the same column as that of evides plus 5 volt and ground pins. Connect the trigger pin to digital pin 11 and eco pin to digital pin 12. Insert the plus 5 volt and ground pins of the IS sensor in the same column as that of evides plus 5 volt pin and ground pins. Signal pin to digital pin 10. Once the connections are done, let's write a code for it in PictoBlocks. PictoBlocks is a graphical programming software based on scratch blocks. If you haven't downloaded PictoBlocks yet, download it from the link given in the description box. For creating the script, first select evive as your board. Then, choose the appropriate serial port. Now to create a script, we must add the robotic arm extension. Next, switch to the upload mode. Next, make two custom blocks for initializing and using the display for the project. The script under the initialization block will connect the server motors to their PWM pins and then calibrate their angles. Next, set the gripper open and close angles. Set the initial angle for the rotational servo as well. Keep the gripper open and send it to the home position, the coordinates of which are x equals to 0, y is 200 and z equals to 200. Next, under the display block, add blocks for setting the text color, background color and font size. Set the cursor to monitor x, y and z positions as well. We will display their values whenever we change the position along any axis. Let's move on to creating the main script for the arm. It should start executing when evive starts up. First, initialize the arm and the display. Next, drag and drop the forever block to make the script run forever. Now we need to make the arm hover over the pickup area. For finding out the values, we will use a scale to estimate the coordinates of the pickup location. For us, they are somewhere near 0 and 150. If the value obtained from the ultrasonic sensor is less than 10, it means a block is in the area. Thus, the arm should pick it up using the gripper. Next, we will find out if block is whether white or black using the IS sensor. Next, we need to find out the drop locations for the black and white blocks. In our case, the coordinates are 150, 250, 150 for black and minus 150, 250 and 150 for white. Write these values in the white spaces in the go to block. The value is also displayed on the evive screen. Once the arm is over the desired area, it should lower down and drop the block. And that's it. Let's upload the code to evive. You can notice that as soon as a block is inside the pickup area, the arm lowers down and picks it up. If the block is black, the arm will drop it inside this block. And if it is white, the arm will drop it inside this block. If you want, you can also add the conveyor belt mechanism to carry the objects to the pickup area. Thumbs up and share it with your friends. Bye-bye.