Last modification: Aug 24, 2022
I found a small, funny looking, modular, wheeled robot with a few sensors that can make it avoid obstacles or follow a line: the Mio Robo3 (was available on Reichelt for 82 euros with the LED matrix not shown on picture). It's very similar to the mBot robot by Makeblock (was also on Reichelt, 88 euros). They are both made by Chinese companies, with the same Arduino Uno-based main board, with makeblock connectors and modules, except that the mBot robot is much more sold and documented. They are supposed to be programmable by Arduino code, graphical programming blocks (scratch or mBlocks) or even python and Android applications.
Unfortunately, the original Robo3 company has long died, the only resource found for mio is the spanish website miorobot.es. In the Formación page, Recursos section, there are links to software, but this was developed with an old version of mBlocks and I wasn't able to make it work on modern linux OS. The Arduino library works however, provided in the linux software page (mirrored here). Just add the zip from the Arduino IDE libraries menu and you'll be able to access the many examples and build your code. One dependency is required: the Servo library, installable from the IDE too. Note that on Ubuntu 22.4, you will need to uninstall brltty in order to have the USB serial port detected. I started to improve the files of the zip to make them easier to read, see the git repo on codeberg.
The robot can be expanded with many modules made for the mio robot or for makeblock (example site). The mio arduino library provides access to all mio modules and examples, but not to makeblock modules, but it shouldn't be too hard to make them work too. The code can be quite simple, for example to make the LED matrix display the distance to an obstacle as measured by the ultrasonic sensor requires one line: leds.showNumber(ultrasonic.read(),4);. Here's a one page program that will make the robot flash its LEDS when we get too close to it, make some noise, go back, and flash again: flee.ino.
Note that reprogramming the robot with Arduino will erase the original demo program that uses all sensors.
The miorobot.es website explains how to install the mBlock software made by makeblock on top of Scratch 3.0 and they still provide an extension to mBlock 3.4 in Spanish that gives access to Mio Robo3 functions in visual blocks. The extension is currently not found in the list of the program, but is available from the Arduino library zip file (the .s2e file).
There are two ways to use mBlock: the online mode, in which the robot is connected to the computer and the blocks are executed when the run button (green flag) is pressed; the offline/Arduino mode, in which the blocks are converted to Arduino code that has to be uploaded as a new firmware. In the latter, the robot doesn't need the computer to execute its new behaviour (I haven't tried it, only with Arduino IDE directly).
The Mio Robo3 blocks appear in the Robotics section of mBlock, next to the mBot blocks. The source code is available. It seems to be Arduino code with a Scratch front-end. I don't know yet how the Mio blocks differ from the mBot blocks, except that they are in Spanish.
The old version of mBlock is available on Mac and Debian too, but I was unable to connect to the robot on Ubuntu with it. The Mio can be connected either with the USB cable or with the provided USB Bluetooth module (serial service). In both cases, reset the Mio after connection of the cable to the computer and a serial port should appear on Windows, look at the Device Manager. I'm not sure when/how it finally appeared, but after that I was able to connect from mBlock and avrdude using the COM3 that was created. mBlock will show if it's connected to the robot in the Robots section, above the blocks there will be a red or green light. I made a backup of the software on the robot in case using mBlock with it will erase the original behaviour, but with online mode it didn't.
From there, the online mode can be used to prototype a program with visual blocks and have fun. Add the starting block, the one that is triggered by the pressing of the green flag. Everything that can be done with the hardware can be done: displaying numbers or text on the LED matrix, changing the 5 LED colours and intensity independently, use the sensors (brightness, ultrasonic, line follower photodiodes), use the actuators and all kinds of funny logic.
Have fun! Feel free to comment below.
Discuss this article, add a comment: