Ardublock

I have already mentioned that there are several visual programming tools for programming Arduino at my Visual programming for Arduino posting. Now I just read about new ArduBLock tool. ArduBlock is a programming environment designed to make “physical computing with Arduino as easy as drag-and-drop.” Ardublock is marketed as a very convenient way to get people to start to learn Arduino: Instead of writing code, worrying about syntax, and (mis)placing semicolons, ArduBlock allows you to visually program with an snapped-together list of code blocks. Ardublock provides an integrated tool that makes it possible to write Arduino programs using the same style of graphical blocks as Scratch and Blockly.  The best part of this marketing is that you don’t need to buy anything as ArduBLock is free software.

ArduBLock works as a extension for Arduino IDE: You can start ArduBlock from the ide (appears under “Tools” menu after installation). The basic operation principle is you draw what you need with ArduBlock, and when you are ready with “drawing code”, the system uploads Arduino code to Arduino IDE, from where it is compiled normally and uploaded to Arduino board (you can edit the generated code in Arduino IDE if you want). The good point of ardublock is that it generates the lines of codes that you can look at if you want/need – This facilitates the transition between using graphical blocks for programming and using written C++ code.

You can install ArduBlock to Arduino IDE by downloading  ArduBlock software from SourceForge and copying it to right place in your Arduino projects directory. There are several steps that are described at SparkFun ArduBlock page and Getting Started with ArduBlock page. Basically the task consists of finding where your Arduino project files are saved, creating several subdirectories and copying the ArduBlock .jar file to creaed directory (I tested installation successfully to Arduino IDE 1.6.1 and 1.6.4). After installation when you next time start Arduiono IDE, you have ArduBlock in the Tools menu. ArduBLock editor in use looks like this.

ardublock1

The ArduBlock window is split into two halves. On the left there are “bins”, which store every possible block you can add to your sketch that is on the right side area of window. To begin, every ArduBlock sketch requires a Program block, that defines the setup and loop functions that every Arduino program requires. From there, you can drag more Blocks over to your program block.

Then click Upload to Arduino to send your drawing off to your Arduino board.

Generated code uploaded to Arduino IDE looks this:

ardublock2

 

Another test was that I tried Adafruit Motor Shield blocks. I had already the hardware. First test to use motor control blocks in test code failed in compiling as compiler could not find the needed libraries. So I downloaded and installed the necessary library according to on Adafruit motor shield library instructions.

More information:

Alternative Arduino Interfaces: ArduBlock at https://learn.sparkfun.com/tutorials/alternative-arduino-interfaces/ardublock

Ardublock – A Graphical Programming Language for Arduino at http://blog.ardublock.com/

Getting Started with ArduBlock at http://blog.ardublock.com/engetting-started-ardublockzhardublock/

Visual Programming Languages and Ardublock at http://blog.ardublock.com/2014/09/04/visual-programming-languages-and-ardublock/

Getting Started with ArduBlock at http://www.instructables.com/id/Getting-Started-with-ArduBlock/

Ardublock! also for Wiring IDE

Pin-Event driven Programming on ArduBlock

1 Comment

  1. 张红 says:

    It is very good!

    Reply

Leave a Comment

Your email address will not be published. Required fields are marked *

*

*