#ksawerykomputery #creativecoding #generativeart #musicvideo #installations #processing #newmedia #livevideo #ksawerykomputery #creativecoding #generativeart #musicvideo #installations #processing #newmedia #livevideo

Flipdigits Player

An algorithm sequencer and a collection of demo animations for a flipdigits display, coded in Processing.

This tutorial was produced in cooperation with AlfaZeta – the flipdigits displays maker.

How does it work?

Download source (.pde)

note: the code is open source, which means that you can use it freely with a proper credit. If you are interested in a commercial use, contact me.


If you’d like to recreate this project, there are a couple of things that you will need:

  1. a flipdigits display – you can get one at Alfazeta
  2. ethernet-RS485 converter (mine is ETH-UKW485SR140)
  3. power supplies: 24V/1A for the display and 12V/1A for the converter
  4. RJ45 and RJ11 cables
  5. USB network adapter (if you don’t have ethernet input like me)
  6. Processing with all required libraries: processing.net, processing.video, org.openkinect (for kinect), codeanticode.syphon (for Syphon)
Alfa Zeta flipdigits display - all parts connected


The very first thing when you have all the parts connected is to check what the IP address of the converter is. The producer delivers this helpful application and with it you can set any IP you want (sadly it works only on Windows). Find the example settings here.

When you know the IP, the next step is to set up the display address – you can do it on the back of the display. Take the easiest way (0x00):

Alfa Zeta flipdigits display - back

The left 3 switches controls the speed of transmission. Set it up to 011, which means the highest 57600 b/s speed. Also make sure your converter is set to the same value in WIZ14xSRConfig.

OK, now we can open Processing. Download the project file and set your converter IP in SENDDATA tab. Also, make sure you switched senddataOn to true in the main tab.

Run the project!


The major functionality of this project is a sequencer. With it, you can arrange your algorithms to be played in a queue and for specific time.

The main tab has all the algorithms listed and grouped for: math, games, capture, fonts and typing.

If you are interested in making your own demo, here is how I hold, process and send the data:

Sending data

Changing states of the display digit parts is based on a very exact protocol, using TCP client from processing.net library. Following the instructions, you have to send 32 bytes in a right order (called a frame):

  • the first byte 0x80 starts the frame
  • the second byte (command) sets the display – we use 0x83 to tell that we are about to send 28 data bytes and refresh the display right after that
  • the third byte (address) decides which display we are changing – set it to 0x00
  • the next 28 bytes specifies the digit states (column by column!)
  • the last byte 0x8F ends the frame

Here is how you figure out a proper byte for a digit:

1 0 0 1 1 1 1 6 5 4 3 2 1 0 6 5 4 3 2 1 0 2⁶ 2⁵ 2⁴ 2⁰

Knowing that, you can send this letter ”E” as byte(unbinary("1001111")) or simply 79 (a sum of powers of 2). However, displaying numbers and letters quickly becomes boring.

Holding data

If you want to display something more complex, you need to organise the bytes in a smarter way. I prepared few ways of holding bytes to make the animation coding process as easy as possible:

byte DISPLAY[W][H] – this two-dimensional array of bytes holds the final data that is sent to the display

Alfa Zeta flipdigits display - array with bytes

char A[W][H] – an array of characters, automatically converted to bytes – helps with all ”text” animations

Alfa Zeta flipdigits display - array with characters

PImage T – a data thumb (image/movie) – helps with preparing legible representations of digit states (ie. in Photoshop)

Alfa Zeta flipdigits display - thumb

boolean BX[W][3*H], BY[2*W][2*H] – two true/false arrays for states of vertical and horizontal lines – helps with abstract animations (ie. noise)

Alfa Zeta flipdigits display - array with lines

boolean CX[2*W][3*H], CY[2*W][3*H] – similar idea to the previous one, but these two arrays are the same size, holding information about corner points (and also the ”gaps” between digits) – helps with drawing animations

Alfa Zeta flipdigits display - array with lines 2

Movie D[W][H] – a movie with every frame being an array of greyscale pixels (brightness of a pixel is a byte state) – with it you can read data states recorded or transmitted (through Syphon) by another project

Alfa Zeta flipdigits display - movie with data states

Movie M – a regular movie that is resized and converted to bytes using Threshold or Dithering algorithm

Alfa Zeta flipdigits display - regular movie

Of course, Movie M would look much better on a bigger scale and density:

Alfa Zeta flipdigits display - regular movie on big scale

Processing data

I developed few methods to operate on this formats. Despite obvious for() loops to operate on the arrays, you can use clr() for all of the formats to clear the screen, full() to make it all white and functions that converts one format to another.

The easiest way to show something complex on the display is to use algorithm movie – it plays any video on format M.

Also, there is a very useful function drawLine(x1, y1, x2, y2) for format C – with it you can draw any shape you want.

There is also a function draw3d(), which takes 3d points and converts them to a loop of drawLine() functions:

Alfa Zeta flipdigits display - 3d wireframe

You can also use a float progress variable to let the animation develop over time:

Alfa Zeta flipdigits display - progress


Finally – here are some examples of how the demo set list works in real:

counters / noise / sin / grid / bacteria / cell / rain / worm / terrain