The Slime Mould Collective

An international network of/for intelligent organisms

CHNOPS BlobArt: BlobJob explained Part 1

BLOB-Art is created by CHNOPS where the BLOBJob application converts the produced data from measurement numbers into matrices.

During the development of the BLOBJob application I encountered a number of difficulties on which I will not spend to much words. So here is a global description of how a matrix is build and then into a JPEG image.

To start with: BLOBJob can create three types of images:

  • Coloured with opacity
  • Colour only
  • Opacity only (on green dots)

BLOBJob is a C++ application that runs on an ESP32 microprocessor that is connected thru USB with a computer.

The working environment is Arduino IDE that has been set up for programming ESP32 processors. This means that all of the settings parameters handling like number of matrices or image type will take place within the Arduino IDE.

Color and opacity are calculated from incoming data (as voltages) into matrix dots with simple algorithms.

Determine the color: Colors are constructed by hexadecimal presentation.

Incoming data is converted to a three figure voltage. The three number that make up the voltage are dividend into three separate numbers and each of these numbers are transformed int a hexadecimal value.

Determine the color:

  • Received data (example): 1.32 volt is transformed into three numbers: 1, 3 and 2.
  • The numbers are converted to their hex values: 1 to hex 01; 3 to hex 03 and 2 to hex 02.
  • Now the hex values are stitched together with a # in front to get a hexadecimal color value: #010302.
  • The hex color is now transformed into a RGB color for the dot, in this case a light green.

Determine the opacity:

Opacity is determined by adding an extra parameter to a RGB color; also called "transparency" or "Alpha channel". Transparency is determined by a value between 0.0 and 1.0 so always between 0 and 1. But the data from the studio is always bigger than 1, so there has to be an algorithm to get this data value between 0 and 1.

This is done by a simple mathematical calculation: ABS(SIN(DATA)).

Because a sine is a wave form between +1 and -1 and take the absolute value of the result I get a opacity value between 0 and 1.

Transferring the matrix to a web page and then onto the computer:

An ESP32 is able to create a web page and has also functionality to perform WiFi communication.

So the first task is setting up the web page and put a square image in it that holds the matrix. Because this matrix is of a SVG type image, due to some technical reasons, it has to retrieved as this kind of file. But the image is virtual, placed inside the internal memory of the ESP32 and therefore can not be copied as a file from the ESP32 to the computer. The solution to this problem is to use FTP (File Transfer Protocol) to transport the virtual image as a file on the computer. This means that the computer has to be a FTP server. (I use Filezilla server for this task)

BLOBJob has the FTP client as a function in its code so now it is possible to transfer a virtual image as a real SVG imagefile on the computer in a specific folder.

Views: 2

Add a Comment

You need to be a member of The Slime Mould Collective to add comments!

Join The Slime Mould Collective

© 2025   Created by Heather Barnett.   Powered by

Badges  |  Report an Issue  |  Terms of Service