 Hey there, in the previous video we saw how to assemble the humanoid robot, make its connections, calibrate it and finally create the code to control it using the arrow keys of your keyboard. If you haven't checked it out yet, click on the card above. In this video, we are going to create a script for our robot to control it using the smartphone via Dabbits Gamepad module. On pressing up, the robot should go forward, on pressing down, the robot should go backward and on pressing start, the robot should do a run step. Similarly, we will assign more such actions to each key for the robot to follow them. Along with the hands and the legs movement, we can even assign actions to its eyes. Now let's begin writing the script in Pictoblocks, 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. Firstly, let's connect the robot to the computer using a USB cable. Next, select evive SEO board and choose the appropriate serial port. Then switch to upload mode. Now to create the script, we must add the humanoid robot extension. Before doing anything else, we need to make a few custom blocks for our humanoid robot. They are initialization, default to make it move and two special blocks to make the robot dance, namely dance one and dance two. Under the initialization block, add blocks for connecting the server motors of the arms, and legs and selecting the PWM pins for each server motor. Next, initialize both the left and the right LED metrics by selecting their DN which is data input pins, CS which is tip set pins and clock pins. Next is the default block. It will set the default actions for our robot. We will call the default block when none of the if conditions in the main script are satisfied. Set the position for arms and legs and add blocks for making the eyes blink. To make the custom dance blocks, under the dance one block, add a repeat block to run the sequence five times. In this sequence, we will make the eyes blink, make the robot do a tiptoe swing and set dance one as a predefined hand action. Under the dance two block, add a repeat block to run the sequence five times. In this sequence, along with making the eyes blink, we will make our robot shake a leg to the beats and do the dance three actions. Now let's move on to the main script. First, set the Bluetooth board rate and call the initialization block. Next, add a follow-up block to keep the code running continuously. Now let's check for the input from the gamepad module in Dabble. If up is pressed, display circular eyes on the LED matrices and move the humanoid forward with normal speed and moving size of 25. Next, if down is pressed, the humanoid will have starry eyes and move backward with normal speed and moving size of 25. If left is pressed, it will look left and move towards left with normal speed. If right is pressed, it will turn right and look towards right. On pressing the triangle, it will turn into an angry bot and flap its hand using fly hand action. On pressing the circle, its eyes will turn into hearts and will do the right handshake. If the cross is pressed, the humanoid will have dead eyes and puts his hand up as if caught red-handed. On pressing the square, the humanoid will have eyes with glasses and will give a high-five. Ain't he the coolest of boats? Next, on pressing the start button, the humanoid will do a down sequence one. And finally, on pressing the select button, the humanoid will do a down sequence two. If none of the above condition is true, then we will execute the default block and wait for the inputs. With this, our script is complete. Upload it to evide by switching to the upload mode. Many features like make the humanoid move and express feelings in as many ways as you want it to. You can also turn your humanoid into Santa and play any tune you want to using Dabble's music module. For this project, if you liked the video, give it a thumbs up and share it with your friends. If you have any ideas, doubts or suggestions, let us know in the comment section below. And for more such exciting DIY projects, subscribe to STEM Media and follow us on Facebook, Instagram and Twitter. Bye bye!