ModKit: new graphical programming environment for Arduino boards

I heard about a new graphical environment for Arduino boards, called ModKit, ready to emerge from alpha testing. Want to teach your kids (or a club) to program their Arduino robots? This is the best tool for the task. Easy to use blocs stack together much like the old Lego Mindstorms GUI, making programming fun to explore. Then you can see the generated Arduino code, modify it if needed and upload it directly from the browser. Oh, did I mention you can use it online? Your code will be saved in your account and you can access it from any computer in the world. Nice, huh? Can't wait to try it out with the Robot Builder's Shield and then with the uBotino controller!

 

Update: March 28th, 2011.

Yesterday I tried out the Beta Preview of the Modkit. Hard to work without Variable blocks, Servo blocks, Motor blocks... and after about half an hour of hard work I discovered I can't save anything. Oh well, clicked on the Feedback button and I let the guys know how are things going. Well, surprise-surprise! I got an invite to see how the old Alpha Modkit works. After another hour of more hard work, this time with many saves, the code was ready to download into the newly made LMR-SH-uBotino robot. Guess what? It worked! Almost perfectly actually. The only odd thing that happened was the servo moved when the Speaker played a note (like a beep). The funny thing was I was telling the servo to move to 0 degrees right after the beep and the servo was moving to 180 degrees, then move to 0 degrees and I was like whaaat? But as soon as I removed the PlayNote block everything worked fine.

I was told that the old Alpha phased out (code was re-written completely) and there will be a new Alpha test group (with less people) and as soon as something works perfectly on the Alpha, it gets moved to the Beta preview. They are working hard to have new stuff added every week so pretty soon we will all be able to have code written in modkit for our robots. Cool!

And now, have a look a how the code for my robot looks in Modkit Block Editor: (I manually scrolled the code and captured the screen, then I cropped and pasted the code in the first screen capture, so the code continues in side by side columns like.)

And here is the code from the Modkit Code Editor:

servoSetup(PIN9);
forever{
  digitalWrite(PIN13,HIGH);
  digitalWrite(PIN5,HIGH);
  digitalWrite(PIN8,LOW);
  digitalWrite(PIN6,HIGH);
  digitalWrite(PIN7,LOW);
  Distance analogRead(0);
  sendMessage("Distance: ");
  sendMessage(Distance);
  if((Distance(300)){
    digitalWrite(PIN5,LOW);
    digitalWrite(PIN6,LOW);
    digitalWrite(PIN7,LOW);
    digitalWrite(PIN8,LOW);
    servoAngle(0);
    delay(300);
    sendMessage("Left");
    counter 0;
    Direction 0;
    prevDist 0;
    repeat(3){
      Distance analogRead(0);
      if((Distance(prevDist)){
        prevDist Distance;
        Direction counter;
      }
      counter (counter(1);
      if((counter== (1)){
        servoAngle(90);
        sendMessage("Center");
      }
      if((counter== (2)){
        servoAngle(180);
        sendMessage("Right");
      }
      delay(1000);
    }
    servoAngle(90);
    delay(300);
    if((Direction== (0)){
      digitalWrite(PIN5,HIGH);
      digitalWrite(PIN8,LOW);
      digitalWrite(PIN6,LOW);
      digitalWrite(PIN7,HIGH);
      delay(1000);
      digitalWrite(PIN5,LOW);
      digitalWrite(PIN8,LOW);
      digitalWrite(PIN6,LOW);
      digitalWrite(PIN7,LOW);
    }
    if((Direction== (2)){
      digitalWrite(PIN1,LOW);
      digitalWrite(PIN1,HIGH);
      digitalWrite(PIN1,HIGH);
      digitalWrite(PIN1,LOW);
      delay(1000);
      digitalWrite(PIN5,LOW);
      digitalWrite(PIN8,LOW);
      digitalWrite(PIN6,LOW);
      digitalWrite(PIN7,LOW);
    }
  }
  digitalWrite(PIN13,LOW);
  delay(500);
}

Neat, huh? I guess kids will love to play writing code! I know I am!

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

This is similar to how

This is similar to how android app inventor works…You would pull your hair out with the limitations though.

 

At the rate they’re going

Someone will write a package that can read your mind and configure the arduino for you. I must say though I have used the lego nxt software and came to hate it. At least this one looks like it goes down the page like normal program flow. In all fairness to lego and labview I have used industial plc software that went across the page as well.

I am back and forth about

I am back and forth about these environments. My kids did some Lego robotics at a day camp, so I do see the value in making it so accessible to spark interest. OTOH, the limitations and lack of understanding of how it works are drawbacks IMO.

It’s…interesting. I have

It’s…interesting. I have always been skeptic about this way of coding and never gave them a shot. I think I’ll try this one though.

Update, I wrote code in

Update, I wrote code in Modkit and uploaded it to my robot and it works!

I used to mess around with

I used to mess around with the nxt programing and it had a lot of limitations. It just made my compter crash every time I was making it a bit complicated. Then I decided to learn C++ and I realised how more effecient it was :). But it’s good we can have both a graphic programming environement and a strictly text-based programming environment for arduino. I will certainly try ModKit.

Another graphical programming tool, but open source and native

Hi, I was working on another graphical programming tool, it’s called Minibloq, and will be released (if everything goes Ok), the next month. Here are videos and more info:

http://minibloq.org

and here is the thread I started in this forum (I didn’t see this thread before, sorry):

https://www.robotshop.com/letsmakerobots/node/26292

Ah, and here are the robots we make:

Multiplo building system

N6 Robot

(those will become open hardware this year).

Minibloq has some important differences with Modkit:

1. Runs native, not online. Even in small netbooks such the OLPC XO or the Intel Classmate.

2. It’s backend is reconfigurable by the user, so it’s not only an Arduino tool. May be used for any target where third party devs or advanced users provide the toolchain and some XML files. It can even generate code in differente languajes, such as C/C++ (first release), Python, Java, or G-Code…

3. It’s portable. Can run from a pendrive.

Regards,

Julián

I like the idea of graphical

I like the idea of graphical programming IDEs to get people started in programming by encapsulating code blocks, but I find the Arduino IDE simple enough as it is. Looking at the generated code, it`s almost line for line exactly like the modkit blocks which seems to defeat the purpose?

I just think that the Arudino IDE in one window with the Arduino website in another window would do the same thing, only with less colours.

Hi Julian,Nice to see your

Hi Julian,

Nice to see your work, I only knew about the DuinOS… Minibloq looks more friendly than Modkit… Can’t wait to play with it!