 Hey there! In the previous video, we learned how to interact with hardware in real-time using PictoBlocks and carried out a few activities to understand it better. In this video, we are going to explore PictoBlock's upload mode and understand how to use it to make a board work independently that is without being connected to the computer. Let's begin by understanding what upload mode is. The upload mode is a mode of working in PictoBlocks in which you can create scripts and upload them to your board so that it can even work without being connected to a computer. Once uploaded, the board works independently according to the script. Let's have a look at it. First, open PictoBlocks. Then, connect evive to your computer via a USB cable. Click on the board button in the toolbar and select evive from the drop-down. Next, click on the connect button and select the appropriate serial port. On the top right corner, there is a toggle button named mode. This button is used to switch between the two working modes of PictoBlocks, namely the stage mode and the upload mode. Switch to upload mode by toggling this button. You'll observe some changes in the UI. For starters, the stage is replaced by the editor window. The editor window shows the equivalent C++ code of the script you create. Drag and drop the head block and one random block into the scripting area. Its equivalent C++ code will appear in the editor window. The other difference that you'll notice is in the block palette. Of the three tabs, only the code tab remains and the number of palettes is also reduced. Those palettes, whose blocks are used to interact with the stage in sprite such as motion, sound, looks, disappear. Now, we are going to create a script to make the head of Toby's cutout move using evive stud sensors. Before creating the script, let's prepare the cutout. Cut out Toby's head and body from the sheet provided in the starter kit. Then, cut along this red dotted line and fold the flaps inwards. Now, take a servo motor and insert it inside the space in the neck. Connect the servo to evive servo channel 1 and set its angle to 90° using potentiometer. Now, take the cutout of the head and fix it to the servo head using this teeny tiny screw. To work with the stud sensors, we are going to use fruit as the conducting element. Thus, connect one end of the jumper cable to evive first stud sensor and insert the other end in the fruit. Now that everything is ready, let's create the scripted pictoblocks. First, drag and drop an if-else block into the scripting area. Now, Toby's head should turn whenever we touch the fruit that is connected to the stud sensor pin 1. For making that happen, drag and drop the channel-touched block from the evive pallet inside the hexagonal space of the if block. The part of the script responsible for rotating the head will be created inside the if-else block. To control the servo, we are going to use the set servo to angle block from the actuator's pallet. Drag and drop it below the if arm. Set the servo angle as 45° to turn the head to the left. To make the movement smooth, use the weight block and set the time as 0.1 seconds. To bring the head back in the center, duplicate these blocks and stack them together. Then set the servo angle to 90°. Repeat the process for making the head turn right. Set the servo angle to 135° in the third set servo block to turn the head right. And to bring it back to the center, write 90° in the fourth set of the servo block. Now, all of this will happen only when we touch the fruit. What about the time when we are not touching it? In that case, the head should remain in the center. Thus, drag and drop the set servo to angle block below the else arm and set the servo angle to 90°. To make this code run forever, drag and drop the forever block around the if-else block. Now comes the most important block, the when evive starts up head block. This block is a must for successfully executing the script. Drag and drop it above the script. Notice that the equivalent C++ code of the script has automatically been written in the editor window. If you know C++, you can edit the code in the editor window too. Now, it's time to upload the code to evive. For that, click on the upload code button. As soon as the upload is finished, a message saying upload successfully will appear on the screen. Now, disconnect evive from the computer and check whether the script is working or not. Switch it on. Whenever you touch the fruit, Toby's head should move. You'll notice that as soon as the upload is complete, evive's menu disappear from the screen. To bring it back, center press the navigation key. Now that you know how the upload mode works, you can create countless exciting projects. If you want to further explore the world of programming, take a look at the step-by-step tutorials available here. You can also check out the examples by clicking on the file button and enroll in our online course on programming by clicking on the enroll for course button. In the next video, we'll learn how to access the inbuilt sensors of a smartphone using double, a project making application and program them in Picto blocks. If you like this video, give it a thumbs up and don't forget to share it with your friends. Also, subscribe to STEMpedia and follow us on Facebook, Instagram and Twitter for more of such educational content. Bye-bye!