Programming ============================================================== Project panel -------------------------------------------------------------- Click the project button on the left menu to start creating and editing Blocky programs. .. ifconfig:: language in ['en'] .. image:: /images/blockly_programmation_2.png :width: 750px :align: center .. ifconfig:: language in ['fr'] .. image:: /images/fr_blockly_programmation_2.png :width: 750px :align: center In the figure below, the top is the project Toolbar, and the left is the Blockly menu. .. ifconfig:: language in ['en'] .. image:: /images/Screenshot_Doc_Ned/screen_niryostudio_blocks_interface.png :width: 750px :align: center .. ifconfig:: language in ['fr'] .. image:: /images/Screenshot_Doc_Ned/fr_screen_niryostudio_blocks_interface.png :width: 750px :align: center 1. Create a new project: click the “NEW” button to create a new project. 2. Save program: click the “SAVE” button, to save a program. You can save a program on your computer or directly on Ned as an XML file. 3. Load project: click the “LOAD” button to import a Blockly program either from computer or from Ned. The file is a xml. 4. Undo. You can also use CTRL + Z. 5. Redo. You can also use CTRL + MAJ + Z. 6. Play the program displayed on the workspace. Once the program is done (success or not), you will get a notification on the bottom of the screen. 7. Stop the current program execution. 8. Add a position block. This will open a pop-up: .. ifconfig:: language in ['en'] .. image:: /images/Screenshot_Doc_Ned/screen_niryostudio_add_position_block.png :width: 300px :align: center .. ifconfig:: language in ['fr'] .. image:: /images/Screenshot_Doc_Ned/fr_screen_niryostudio_add_position_block.png :width: 300px :align: center This is the most useful way to add a position command block to your workspace. You can choose between a “Move Joint” block and a “Move Pose” block, and use either the current robot state, or a previously saved position. 9. Select the save mode when using the top button on Ned. .. hint:: While the Niryo Block interface is open, you can add a "Move joint" or "Move pose" block with current joints values and pose values just by pressing and releasing the top button of the robot. 10. Help. 11. Clicking on this icon will center the workspace on your blocks. 12. Workspace zoom control. 13. Workspace zoom control. 14. To delete a block, simply drag it and drop it onto the trash. You can also select it and press the delete key on your keyboard. 15. The “Niryo Robot” functions in the block library cover almost all of the possible commands you can execute on Ned: - Arm commands - Movement commands - Tool commands - I/O setup and control - Vision commands - Conveyor control .. note:: The "NIRYO BLOCKS" panel contains everything you need to create complete programs for Ned. This is probably the panel on which you will spend most of your time. 16. This is the workspace. Your whole program will be there. .. note:: You cannot execute a new sequence while another sequence is running. If you want to start a new sequence, you will have to stop the previous one. .. hint:: Niryo blocks along with the learning mode is the perfect combination to easily create programs in no time. Activate the learning mode, then for each position you want, add a position block corresponding to the current state, and that’s it.