In this activity we are going to cover block coding, and you’ll get the chance to try out Blockly in the KINI App for yourself! Coding is the method of giving a computer a set of instructions to perform a specific task. After today’s activity you’ll have the chance to create your very first code in the KINI App.
Follow the steps below to access Blockly in the KINI App:
- Open the KINI App
- Ensure that you have your KINI Robot and that it is connected to the internet.
- When you open the app, the Blockly tab appears in the bottom right corner, simply click it to begin.
When Blockly is opened, two blocks will automatically appear. These blocks let you control KINI, and choose when it will do actions.
- The first block is “Repeat Once.” If you put an action into this block it will happen one time. The order that you put the actions in this block matters.
- The second block is “Repeat Forever.” If you put an action into this block it will always happen, so the order does not matter.
- To find an action to put into these blocks, you can choose any of the tabs on the left side to see all of the possibilities.
- Once you click an action block, it will automatically appear beside the two Repeat Blocks. You can then drag the block into either Repeat Block and it will easily snap into place.
Some action blocks are customizable;
- The first type of customizable feature in the action blocks are numbers. To change them simply click on the number and a keyboard will automatically appear. Type the new number that you would like and then select “Ok.”
- The second type of customizable feature in the action blocks are drop down menus. To change them simply click on the drop down arrow and select one of the options.
- The last type of customizable feature in the action blocks are custom assembly menus. To change an action block simply click on the settings symbol in the top left corner. Then assemble the block as you would like by dragging the blocks from the left side and connecting them to the existing block on the right side. When you are finished, just click the settings symbol once again to exit the custom assembly menu.
- In coding, a sequence is an ordered set of steps; computers need instructions with the correct sequence to perform a task. To create a sequence add multiple action blocks of your choice to the two Repeat Blocks. For example, you can instruct KINI to first move forward for 5 seconds, then stop, then lastly move backwards 50 centimeters (as shown below).
- To run a code on your KINI, press the orange play button on the bottom left side. To stop it, just press the same button once again, but this time it will be a red stop button.
- If you make a mistake and would like to delete a block, just drag it to the trash can in the bottom right corner, and it will disappear.
Great work everyone! You just learned how to use Blockly to control your KINI using the “Repeat Once” and “Repeat Forever” blocks! You can try out the code used in the example with your KINI, or try making your own! Good luck and have fun coding!