Exercise 4
Items needed:
An assembled Smorphi mini / Smorphi2 robot
A computer
A USB to USB-C cable
Internet connection
Objectives of exercise:
Download and set up SmorphiBlockly
Learn how to use SmorphiBlockly
Steps / Description:
- [Download SmorphiBlockly]
- Go to Smorphi-Blockly to download the latest version of our files via the download zip button. It can be found in the drop down after clicking on the green Code button. Make sure you downloading from the Main Branch. SmorphiBlocky is a visual graphical programming editor for Smorphi robots. It Provide static type language blocks and code generators for programming on Smorphi robots. By dropping code blocks in the programme, C++ code will be generated which you can open in your Arduino IDE and upload to the Smorphi Master board.Features of SmorphiBlockly consist:* Programming Smorphi using drag and drop code blocks.* Uploads the code using Arduino IDE to Smorphi Master board.* Useful “code block warnings”.* Compatible with any Smorphi robots, Arduino and ESP32 related boards.* Works on Windows / Linux.
- [Setup SmorphiBlocky]
- [Blockly code blocks]
- [How to use SmorphiBlockly]
- [Setup your Arduino IDE]
- In order to run the code from SmorphiBlockly, we will need you to install the required Smorphi libraries into your Arduino IDE. You can refer to Exercise 2 for more information.
- [Test your setup]
- Place the following code blocks into the programme. Once you done click on the yellow button to open the code in Arduino IDE
Upload your code from the Arduino IDE to the Smorphi Masterboard. Once upload is completed, press on the ENABLE button on the masterboard.Your Smorphi should move forward for 3 seconds, stop for 3 seconds and then repeat.
- NOTE:
- Usually, when you upload the code to the master board, the process should complete automatically. However, sometimes the upload will be stuck at ‘connecting……’
There are 2 solutions for this:Before it resolves into an error, press and hold the Boot button and click the enable button on the Master board at the same time, then release and wait. The code should complete the upload to the master board.
You can unplug and reconnect the USB cable from the Master board to your computer and then reupload the code.


