Interface Application Programming



This week we will compare various tools and alternatives that can be used when interfacing with our microcontrollers.


Processing is a flexible software sketchbook and a language for learning how to code within the context of the visual arts

Or, at least, that’s how they introduce themselves.

If you are familiar with Arduino IDE, the Processing IDE will look and feel strangely familiar.

So familiar, in fact, that you might even think that Processing is just another arduino code editor, but it is not!

The code that you write on the arduino editor is eventually uploaded into, and runs from inside your microcontroller.

The code that you write on the processing editor runs on your laptop and will generally be used to prototype an interface that will talk to the microcontroller, and receive data from it, send requests to it, or both.

The main advantages are that it’s free and easy to get started, and if you already have some knowledge or software development skills, the language syntax is relatively intuitive and easy to pick up.

The language reference is superb, and while there are some choice that I’d strongly disagree with (with overloaded methods that are unintuitive to read), the language will generally guide you towards what you are trying to do.

The Libraries and extensions provide a bunch of much needed that vastly extend the capabilities beyond “just a computer” and touch on all sorts of things: from image, audio and video processing to connecting to cloud services to consume and send data, to PDF generation for automated reporting, archival and storage of data for historical purposes.

General Rule of thumb: Use this as a quick prototyping tool, and as a quick way to get started. Put end users in front of the screen and ask for their feedback and advice before investing in other alternatives. Make sure that the graphics are poor and look unfinished so that they understand that it’s a prototype, and only move on to larger and more expensive options once the users have helped you answer all your questions.

Custom application

The main drawback of writing a custom application from scratch, compared with the previous option, is that this requires some fundamental knowledge of software development, being familiar with a programming language, and a framework or library that can communicate via Serial ports.

The main advantage is that this is the only option that is truly scalable, and unconstrained by the other tools and frameworks.

This provides an easy entry port for people who come from a software development background, as all the tooling, and infrastructure is very familiar to them, and they just need to focus on this tiny device that can be treated like “just another peripheral”

Everything after this starts depending on the language and framework of choice:

These are all general questions that you might want to consider when deciding which language to chose when writing a custom application from scratch.

It is true that other alternatives might offer similar features (eg. Processing supports REST clients to consume and send data to remove services, but these will probably be lightweight clients that do not support advanced features.)

General Rule of thumb: Avoid writing an application from scratch for simple visualization tasks, and only get into this realm of possibilities when all other prototyping options have been exhausted; the costs both in development, debugging and overall support skyrocket as soon as you get into custom-app-territory.