Let's Make Robots! | RobotShop

Minibloq: New graphical programming for Arduino, Multiplo and robotics



I'm working on an new graphical programming environment for Arduino, physical computing devices and robots. It's called Minibloq and, although it's not finished yet, it's possible to see something here:

I think it may be specially usefull in schools, and it may have some interesting features as well, like the following:
  • Runs completely offline and it's portable (can execute from a pendrive).
  • It's fast (C++ native program).
  • Really generates C/C++ code, compiles it and sends it to the board's flash, just with one click.
  • Wine compatible: It even runs on an OLPC XO (there are videos on the website).
  • Expandable.
  • Modern GUI, with dockable panes, zoom, key navigation, etc..
  • Made with open source tools (basically wxWidgets, MinGW, Code::Blocks, Inkscape...)
  • Once finished the v1.0 it will become open source (MIT like license, with just a limitation: non-military use).


I'm trying to finish a first public version (v0.4) for the end of the next month (waiting for a possible kickstarter one-month campaign).

Feedback is welcome! Here is a small screenshoot (a blink program):


Ah, and here are examples:







Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Personally I don’t like graphical programming interfaces and think they only mess up people’s view of code and what is going on. Sooner or later the user have to learn how to write text based source code so why don’t start there in the first place?
By the way, -why have you got the main loop in the setup() function and not in loop(). Is that good example?
But the design looks great and good luck with your project.

lol i remember a teacher preaching the same stuff about writing HTML to make websites.

but we dont all want to become webdesigners, some people just want to have a homepage.
those people are now on websites like myspace, which would not exist were it not for their immense lazyness.

Frankly i find it really fascinating and well done !

I have been wanting to work on a similar, graphical based programming interface for beginners and learning processes for years now so i can understand your logic.
As long as you have the possibility of also displaying the code that is beeing generated/used, it can really server as a nice abstraction to introduce people to micro controller programming progressivelly, so , really good job! 

Same remark as Geir Andersen for the setup() and loop() though .

WIll be keeping an eye on this:)


Hi, first, thanks for your comments!

Regarding the setup and loop, I will explain a little more the logic behind Minibloq: It's a reconfigurable code generator (and it's not necessarily linked to C/C++, can generate other stuff too). In this particular screenshoot, it's configured to generate nearly standard Ardiuno Code. And Arduino uses the setup+loop, which I don't specially like, but there are things that are alread there :). So, the first release is for Multiplo (like this robots), which has Arduino compatible controllers (which we designed too), and for standar Arduinos. So the fastest way to reach a public release was to put an Arduino core out there. I don't like the loop() thing, but leaved it there to avoid the program to reach non-deterministic MCU states, as en empty main cycle (I know: not always reached).

We are working on what we think is a better API (really a better HAL), but this is in the future, because now, all the energy is in this environment itself.

Regarding the text/graphical programming, I have a lot of things to say, and this may be a good place, I think. So I will try to start with a few:

1. We teach to different people. RobotGroup has nearly 50 kids, some of them starting at 6 years old, learing robotics. Believe: we tried with text based programming. Since we are testing this tool everything changed here. Think in a classroom where all the kids are together, playing with cool stuff. They don't really care why it's not running because the forgot a ";". They are centered on their robots. This was a need for us in situations like this. And we worked with kids for years, with very different equipment (until we started to make our own stuff).

2. Not all the people wants to program. I personally teach 12 classes a year in an postgraduate course at the Universidad de Buenos Aires. It's oriented to architecs, designers, and people with other kind of interests. I have little time (only 12 classes to explain the whole "robotics thing"), and they at least can get something working. If they want, they can go further. If they not, just finish the course and that's all.

3. I worked a lot with Legos, and the like. This tool is not "marketing driven". That's why it shows the generated code, because I want the user to make the transition to text based, and that is because I agree that text is finally better. But there is a fact: We make robots (and currently we at RobotGroup are the only company in our country manufacturing educational robots). And the people who buys the robots want them working, as fast as possible. Some of them, just play, so this kind of tools are ideal, and they will not even see the generated code. But the one who wants to get the robot doing more complex things, will then stop using Minibloq, to go the Arduino IDE. And we have a third IDE (not published yet, but is what we use internally): a Code::Blocks IDE. This tool will be published in about two month (it has another virtue: we program the robots with it, the Arduinos with it, and the Minibloq itself was programmed with it, it's a very complete tool, and we want the user to have it too).

Well, this are some of my thoughts, but everyone may have his own experience, so this is just another tool, that I hope will help at least a little to spread the thing of programming the MCUs.




Hi, Minibloq is in Kickstarter from today: http://kck.st/mnWW8y

This means that the release is comming soon!

Any help making this public is very very welcome.





Finally, after a lot of work, the first Minibloq Beta version has been released:


It's just a Beta, but I hope you enjoy it. There is also preliminary documentation here:





Good to hear. I'm teaching an intro to hobby robotics course for kids right now, and I want to create an intermediate and advanced course too. Minibloq may be a good option for the advanced course.

Thank you for posting.

Thanks! In fact we are using Minibloq in pilot courses with kids in several schools in our country. The software will still involve a lot if everything goes ok. Here there are 2 posts that may be userful for you:

1. Open source activity pads (made with Inkscape): http://blog.minibloq.org/2011/09/open-source-robotics-activity-pads.html

There you can download the SVG or PNG files to plot them.

2. Multiplo equipment programed with Minibloq in primary schools: http://blog.minibloq.org/2011/09/hardware-for-primary-schools-and.html

Also, your feedback will be very welcome!



Hi Julian,

Thanks for your hard work with Minibloq. I gave it a try last night and I found it a bit un-intuitive (for me), but after a while I figured it out and I could write the code I wanted.

A few observations/questions:

1. I need to be able to use my own hardware. For example, The Robot Builder's Shield with Arduino Uno or Duemilanove 328. For that, I need to reconfigure the way the pins are set on a D328 as you have it. My RBS uses pins 5 and 6 for motor PWM, 4 and 7 for motor direction, 8 through 13 for servos (using the Servo library) or other digital devices, pins A0-A5 for sensors. Also, pins 2 and 3 are available for encoders, pins 0 and 1 for serial comms. Any info how to reconfigure the board pins in Minibloq? For example, if I click on the D8 pin on the board image, I could get a menu where I could select the use for that particular pin, like digital pin, servo pin, motor direction pin, etc.

2. I am not sure how the motor block works. How is the direction set? Automatically? Do you have to set the direction pins before you set the motor speed (by using blocks)? Edit: after looking at the examples, I figured that for reverse I need to add a - sign before the speed value. 

My shield has the possibility to manually configure the motor control method by jumpers, either by using 3 pins per motor (dir0, dir1, pwm) or 2 pins per motor (dir and pwm). While you are familiar with the first mode, the second mode works like this: dir=Low means motor Forward and positive PWM signal sets the speed (0=stop, 255=max), dir-High means motor Reverse and inverse PWM signal sets the speed (255=0, 0=max). Is there a way for me to configure the motor block what pins does it uses? Edit: I can edit the .h file and have it work the way I want it, but it's a hack.

3. Will be available in the future something like a User Block that I can use to create functions that I can colapse or expand as needed? For instance, I would like to create functions like Forward, Reverse, Left, Right, that set the motor direction pins and speed so I don't have to write the same code again and again... Another example would be creating a PlaySong function...

4. Can we rename the motors and servos with more intuitive names? For instance, keep the motor0 name but let me rename the motor above it, just like a variable, with what ever name I want (for example: Left). Then, if I use the motor block again, if I select motor0 then rename the block automatically with the name I gave it before. Same for the servos.

5. Also, for the IRremote pin, it would be nice to have the possibility to set the pin like for a Ping sensor. For instance, to pin D14 (analog 0) just in case I use all digital pins.


I hope this is good feedback!

Hi Ro-Bot-X, thanks for your feedback! Also, your shield seems nice. I will try to answer all your questions (sorry, my English is not the best):

1. Right now is difficult to add support for other boards and shields, because I did not finish the multi-hardware subsystem at all. It will be possible to do this in about two versions (proably for the v0.82.Beta). But it's absolutely in the roadmap. I worked a lot designing that subsystem, but did not have the time yet to implement (it's huge). But if you want right now to try, all the pins are defined in the calls to the DCMotor class' constructors, in Minibloq.h. But there are a lot of Minibloq.h files: One per board family (this will still change a lot...). So you have to go to the /Targets subdir and edit the Minibloq.h for UNO, and for Duemilanove. The configurable pins will exist, but in a future version.

2. The speed in the motor blocks can range from -100 to +100, with floating points. This makes the block more independent of future variations in the PWM implementation (for example, this is more independent from timer resolution changes). In fact, nearly everything in Minibloq is normailized to 0-100 or -100 to 100 flating point ranges. Tha resuled more intuitive for kids (in our experience in class room at least). I saw that idea for first time in a MIT book about robotics for beginners. If you put speeds out of the range, the DCMotor class constraints the values in run-time. There is also an example in the Examples folder with motors going forwared and reverse.

3. Yeah! There will be user blocks, made of other blocks. And I will maitiain the current possibility of adding more XML blocks by third party developers also.

4. It's not possible now to rename pins, and thing like motors. It's in the roadmap too. Since it's in close relation with other important features not yet implemented, sadly this feature will still take some time.

5. It's prabably possible now to modify the IRBlock XML to accept pins. I think in a future version I will include that possibility by default. Right now, I wanted to make it very simple, because the main difference with the Ping is that in most constructions, there is only one IR, and there may be a few Pings. So for the Ping is a must. But I think it will be better to add pin selection for the IR too (anyway, I have to check some firmware stuff before doing that, but you can modifiy the XML to start testing it, if you want). Thanks!

Cheers! And thanks again.