A Simple Program¶
Let’s write a simple program to make the TurtleBot3 do the following tasks consecutively:
- Move forward for two seconds
- Wait for one second
- Move backward for three seconds
- Wait for one second
Drag and drop blocks¶
Launch the Blockly web interface and ensure that TurtleBot3 is connected to the master (your pc/laptop).
On the left sidebar of the Blockly web interface you will find Dabit-Turtlebot3
icon. Click on it and drag a Move_Forward
block onto the workspace.

Our task is to move the TurtleBot3 for two seconds, so change the seconds field to 2
and let’s run it at a NORMAL speed.

The following figure shows the remaining steps to complete the program.
You can find the Wait 1 seconds
block inside the Control
icon on the left sidebar.

Launch the program¶
After writing the program you should launch it to make the TurtleBot3 move.
Click once on the Launch
icon on the far left of the Blockly web interface and you should see TurtleBot3 perform the tasks consecutively.
