Programming

Project panel

Click the project button on the left menu to start creating and editing Blocky programs.

../_images/blockly_programmation_2.png

In the figure below, the top is the project Toolbar, and the left is the Blockly menu.

../_images/screen_niryostudio_blocks_interface.png
  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:

../_images/screen_niryostudio_add_position_block.png

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.

  1. 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.

  1. Help.

  2. Clicking on this icon will center the workspace on your blocks.

  3. Workspace zoom control.

  4. Workspace zoom control.

  5. 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.

  6. 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.

  1. 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.