xLab: analogPixels

Dithered Selfie Sticker Printer

// Raspberry Pi, Processing, camera, button, thermal printer

The Raspberry Pi acts as the mini-computer that controls the connected components. The camera captures your image as pixels and sends it to Processing (the programming environment) to reinterpret them based on their greyscale value against the dithering algorithm, which creates a pixelated version displayed on the screen. Pressing the button triggers the code to save the image and send it to the thermal printer.

Exihibited at Virginia Commonwealth University School of the Arts in Qatar, as part of the “Hello, World! Exploring Computational Potential” Exhibition from Nov 28, 2021–Feb 17, 2022



The graphics on the screen are generated by the code running on the Arduino board. The knobs control in real-time the value of one of the parameters in the code to affect the graphics.

> The first interactive screen demonstrates “variables”, a data type that can store specific information, like numbers or characters. By turning the knob, you control the variable of the circle size.

>> The second screen shows a “for loop”, a statement for specifying iteration, which allows code to be executed repeatedly within one frame. By turning the knob, you control the number of iterations the for loop goes through, which controls the grid columns and rows.

>>> The last screen shows “arrays”, a data structure or collection of variables, each identified by a numbered index. By turning the knob, you control the size of the array of colors that are used to fill in the circles.