Blinkenlights Library for Processing

This Processing library is designed to export sketches to the Blinkenlights BML file format. If you'd like to convert a load images to BML, please check out Dan Fraser's converter.


Installation Instructions

Usage Instructions

int frameDuration = 41; // 24 fps

BMLWriter bl = new BMLWriter(this, frameDuration);

// optionally set the grid dimensions (default is 96x32)

// optionally set your details for the credits
bl.setAuthor("Robin Senior");
bl.setTitle("My First Sketch");
Doing this will cause your sketch to look pixelated when you run it. If you are happy with how it looks, start writing it to a BML file by putting this in your setup() method:
If you would like to send your sketch directly to a BlinkenServer, first create a PacketSender and then pass it to the BMLWriter constructor:
PacketSender mySender = new PacketSender(this,"",2323);
BMLWriter bl = new BMLWriter(this, 41, mySender);
ATTENTION: When exporting to file or across the network, make sure that the grid and the preview are turned off, or it make cause the image to be exported with visual artifacts. Here is a sample application, view it in action here:
import processing.blinkenlights.*;

int x = 0;

void setup()
     // instantiate the Blinkenlights library
     BMLWriter bl = new BMLWriter(this, 41);

     //only use the grid for testing

     bl.setAuthor("Robin Senior");
     bl.setTitle("Crappy Circle");

     // set up your sketch
     size(960, 320);

     // this is where the magic happens

// do your own thing
void draw()

     x += 5;

     if (x>width)


Several of these examples are adapted from sketches originally made by Daniel Shiffman.