Minibloq: New graphical programming for Arduino, Multiplo and robotics

 

Hi!

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:

http://minibloq.org
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:

http://blog.minibloq.org/p/examples.html

Regards!

Julián

 

 

 

https://www.youtube.com/watch?v=fpWi_fZCRv0

Personally I don’t like

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.

Fascinating!

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:)

Cheers!

Thanks! And answers…

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.

Regards!

Julián

Minibloq is now in Kickstarter

 

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.

Regards,

Julián

 

Minibloq Beta released

Hi!

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

http://minibloq.org

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

http://blog.minibloq.org/p/documentation.html

Cheers!

Julián

 

Good to hear. I’m teaching

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.

Minibloq with kids

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!

Cheers!

Julián

lol i remember a teacher

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.

Hi Julian,Thanks for your

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!

Questions about Minibloq

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.

Julián

New ready-to-use Examples with Videos, Code and Fritzing Circuit

Hi! As part of the new preliminary documentation, we have added a page with complete examples, most of which include Frizting diagrams, videos and Minibloq code (mbqc files). These examples start from the simple ones (like the well known “blink”, to get started fast) adding complexity progressively. All of them include the parts list and most can be built using spare components as well as sets such as the SparkFun Inventor’s Kit for Arduino, the ::oomlout:: ARDX or the RobotGroup Multiplo TechBox. We encourage Minibloq users to add their own designs to the forum, so we can post about them too! We want to add more examples soon, specially from other users and with other kits (you can send yours, of course), and to improve the existing.

To see the new examples page, please follow the following link:

http://blog.minibloq.org/p/tutorials-and-examples.html

 

Tutorials.png

 

e_IMG_6066.JPG

Thanks!

Julián

Translators needed

I forgot to say that we are needing help with translations to other languages (right now Minibloq is only in English and Spanish).

Thanks again!

Julián

Minibloq.v0.81.Beta released

 

Hi!

Last week was released the Minibloq.v0.81.Beta, which is the first version that supports full internationalization.  Soon I will be posting about the roadmap of the project, as well as updating the documentation with the new features. Also, I hope this week to document exactly how to add complete translations to any language.

Here is the post about the release:

http://blog.minibloq.org/2012/05/minibloqv081beta-full.html

This is the changelog:

http://blog.minibloq.org/p/versions-changelog-and-known-issues.html

Thanks!

Julián

 

I could translate to
I could translate to Finnish, but you may don’t need it :smiley:

Translators needed

I would love to have it in Finnish! I will send to you my email by personal message.

Thanks!

Julián

Translation

I could translate it in Romanian. Contact me if you would like to. :slight_smile:

Translation

Great!! Many thanks! I will send to you a message right now.

Cheers!

Julián

Minibloq native for Linux released

 

Hi! yesterday, we released the Linux native version of Minibloq:

http://blog.minibloq.org/2012/08/native-minibloq-for-linux-released.html

Feedback, testing and ideas are very welcome…

Thanks!

Julián

julian.dasilva

 

miniBloq.v0.82 and niniSim.v0.2 released

Hi!

I’m glad to announce the new miniBloq.v0.82 version. It has a lot of improvements, and it supports the Arduino Leonardo, the new DuinoBot.v2.3 (both in HID and in CDC mode) and a bunch of robots, like the Pi-Bot (pi-bot.org), Sparki (Arcbotics), SparkFun RedBot, etc… There is a lot of new features too: small 2D simulator for kids (miniSim), more blocks, better usability, improved performance, and a new XML backend to easily add new hardware and new blocks without recompiling anything! This last feature makes it really easy to hack, since miniBloq now can generate code not just for C/C++ Arduino-compatible boards, but also for Python and nearly any imperative/OOP language Take a look at the release post in miniBloq’s website: 

http://blog.minibloq.org/2014/05/minibloqv082-released.html

Enjoy!
Julián