XOD — A New Visual Programming Language for Arduino

Alasdair Allan
3 min readAug 15, 2017

Visual programming languages aren’t new, my own first exposure was with a system called AVS back when I worked at GEC-Marconi in the early nineties. Although the most well known, and longest standing, is probably LabView.

However over the last few years visual tools seem to be going through a renaissance. This is being driven, at least in part, by the growing popularity and the communities that have formed up around two very different visual tools, Node-RED and Scratch.

Enter XOD, a new visual programming language for the Arduino, which has just been released into the wild by its creators.

A laser wielding bot driven by Arduino, three SG90 servos, and a XOD program. (📷: XOD)

The project is still in very early days, and support for Arduino libraries and other hardware is somewhat limited, and while it shows promise I think it going to be confusing for beginners as it stands. Right now the visual blocks map closely to the underlying code. However this problem may be resolved with time as “composite” nodes can by connecting two (or more) existing nodes. In other words, you can build small (but higher level) logical blocks which you can then distribute to other XOD users.

Simple XOD program (left) that monitors a moisture sensor and displays the result as a percentage on an LCD screen. (📷: XOD)

XOD will however face stiff competition, as both Node-RED and Scratch support Arduino to different degrees. Like the board market where every new board is billed as an “Arduino killer” or “Raspberry Pi” killer, toppling the leaders mean building a community. Personally I think community is — at least these days — the biggest differentiator on whether a technology will succeed or fail.

XOD program, monitoring a moisture sensor and triggering a pump. (📷: XOD)

However both Node-RED and Scratch require special sketches to be loaded onto the board. Node-RED uses Firmata, and the S4A fork of Scratch that supports the Arduino uses a custom sketch. This means that your laptop has to stay attached to the Arduino—and here XOD is different.

One thing I like a lot about the XOD approach is that it generates native code for the target platform. There’s a lot of boiler plate code in its automatically generated sketches, but there’s no need for Firmata, or an attached laptop to control the board. It runs on the Arduino as if it was programmed with native tools.

The XOD core language, development environment, and standard libraries are all available on GitHub. Alternatively the development environment can be run directly in the browser, or downloaded to your desktop.