Exercise 28
Items needed:
A computer
A USB to USB-C cable
Internet connection
An assembled Smorphi mini // Smorphi2 robot
Blynk account
Objective of exercise:
Learn about Blynk
Learn how to control Smorphi using Blynk
Steps / Description:
Firstly, go to your Blynk website and click “Quickstart Template”.

Next, go to “Datastreams” and click on the “edit” button.

Then, click on “New Datastream” and choose Virtual Pin.
Change the virtual pin number and Data Type to string.
Go on your phone, download the Blynk IoT app and log in.
After logging in, press on your quickstart device and press the wrench.
Drag and drop the joystick and click on it in order to go to advanced mode and click the datastream “joystick advance v3”(The virtual pin name created earlier).
- [Some important things to change in Arduino]
- [Coordinates code]
- You can try out first and once you are done, you can compare your solutions at here
Open Arduino Serial Monitor. We can now see all the coordinates being printed on the serial monitor for the Blynk joystick. By obtaining the joystick range value, you can understand the digital values of the joystick that are transmitted when you use the joystick to rotate between 0 to 360 degrees (in 2D space). For this exercise, the joystick range has already been set.
- [Challenge]
- Programme a code to control Smorphi using the Blynk joystick and reach the end. Test your knowledge of coding!!If you struggle to figure out the code, Hint: First code out all the functions/ logic(Pseudocode), then try to compare your solution at here
- [Second Challenge]
- With the Joystick code, add more functions and make / Smorphi2 change shapes.You can try out first and once you are done, you can compare your solutions at here
You, can also add additional functionality of turning the robot clockwise and anticlockwise using the buttons on Blynk interface.






