Program with blocks
Blockly is an open-source programming language mixing visual and text programming. Developed by Google, this language allows you to assemble visual blocks in which text is written. We provide an integration with the Thymio (since version Aseba 1.5):
Our integration of Blockly natively provides the events available on the Thymio, allowing you to program purely with events. This is a difference with the Scratch integration, which, while providing a similar interface, takes a sequential approach to programming.
Launch Blockly
Up to Aseba 1.5.5
Just plug Thymio to your computer and start "Aseba Studio" by clicking on this icon:
Aseba Studio for Thymio
Once the text programming environment is open, look on the bottom-left corner and click on "Launch Blockly".
Since Aseba 1.6
Start Thymio Web Bridge application first by clicking on this icon:
Thymio Web Bridge
Then, start Thymio Blockly application by clicking on this icon:
Thymio Blockly
It is recommended to use Chrome, Firefox or Safari.
Note that the new Thymio Blockly interface is currently not available for linux. Th older setup is maintained, you have to start Aseba Studio, then start Blockly from the bottom left panel.
The Blockly interface
The Blockly interface is composed of:
- A list of categories (event, actuators, LED…) regrouping the blocks
- The block selection window (appears only when you click on a category on 1)
- The program area, where you drag & drop your blocks and assemble them
- The Play and Stop button, which load the program and stop it and the robot
- The New, Open and Save As icons
- The online documentation and the language selection buttons
- The equivalent text program of your Blockly program (only for information, not possible to modify the text in this interface, you have to open your program in Aseba Studio to do so)
How to program
- Choose a category (begin with an event)
- Choose a block and drag and drop it into the program area
- Add other blocks to create groups
- Press Play, and that's it!
Here is an example of what a VPL program looks like in Blockly. Both programs correspond to the same behaviour of the robot!