Smart Blocks are a great way to improve your coding skills and speed up your progress.
Check out the video tutorial on YouTube.
To create a Smart Block simply follow these instructions:
- Click 'Add Smart Block" button in Blockly tool bar
- In the search box that opens either:
- Write down a name for your new function, or
- Click +New Smart Block
- Name your Smart Block and hit Create
- A new Blockly tab will open with a 'define' block.
- Add your code within the define block
- When done, simply click the 'Main' tab to go back to your code
- Open the Smart Blocks category
- Add the Call block to your Main code
- When your code is executed, the Call block will cause the code in your Smart Block to run
Here is how to create a Smart Block that will make your robot turn to the right by 90 degrees: