Software testing

Put on your techie hats for just a moment, and let’s dive down into the things I’ve had to build to get the first stages of the project going… don’t throw away your other hats though, creative practice with technology (and life) isn’t always about possessing discrete hats we can easily pop on and off!

The entire project is based off node.js, which means we are using JavaScript as the language of choice in writing the code needed to make the interactions come alive.

Given the cost, power and installation considerations, having even a small form factor PC would impose a rather heavy toll cost and risk-wise on the project. Everything had to be run off a tiny computer known as the Raspberry Pi 3 (henceforth referred to as the RPi), which provided sufficient processing power and connectivity for our needs.

Building and testing projects that run off another machine, in particular tiny form factor computers that will have to operate without a display or input device (i.e. ‘headless’), requires additional supporting tools to allow the devices to come together. For one, testing light patterns and sensor calibration would have been an arduous process if a development machine cannot get direct access to the RPi. A secure network setup has to be made to get it all devices visible on the local network which will allow easy remote access to the RPi. This would also allow the later stages of development when the RPis have to talk to each other while enacting cross-bench interactions.

Software testing usually involves developers writing little ‘hooks’ to quickly trigger, override settings in the running application. In the case of When Echoes Find Light, the manual triggering of sensor events, as with the various distinct lighting patterns, are required to rapidly iterate through different settings and treatments. This is where the benefit of wearing both technological and creative hats come in: one is not mutually exclusive from the other, and this allows for a much more rapid conversation on effect and affect whilst writing lines of code. The act of writing code becomes a creative process.

The development laptop and software connects directly to the RPi to edit and manage version control of the source code. However, in the process of embodied prototyping, having a laptop to switch and trigger events can present a cumbersome experience for us. We took to using a small smartphone and the TouchOSC app to design our own control panel for triggering and adjusting effects.

The TouchOSC app is an app designed to run on the OSC protocol – Open Sound Control. OSC was developed as a possible successor to the ageing MIDI specification, and was predominantly used by musicians to achieve extremely low-latency sending of notes and time-sensitive events between software packages.

The base system runs on Node.js, a server-side JavaScript environment that allows Javascript to be executed easily on any machine that supports Node. It’s not the fastest environment out there, but it provides a very easy entry point for prototyping addressable LEDs and sensors given its huge userbase and contributed nodes.

To allow inter-bench communication, MQTT was used to relay short message payloads to each other. This lightweight transport protocol, designed for IoT devices, is efficient and well-suited to this task. The emphasis here is to build a low-latency local network to transmit moments of presence from one bench to another.

10 months ago

Leave a Reply

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