A new way of driving LED devices ?

At ArKaos we are writing software to drive LEDs since many years. We have our standard media server software MediaMaster and our VJ software that is used every day to drive LED walls and LED fixtures. We have also our LED mapper that is a cool way to drive LED fixtures based on DMX or ArtNet.

Still it’s too complicated and/or expensive to use. It’s too complicated because simple LED fixtures do rely on DMX or ArtNet to work, and there are too many magic numbers that can go wrong and prevent the magic pixels to blink. On the other side bigger LED walls have expensive hardware interfaces and make it unpractical financially for too many performers and clubs.

There must be a way to create LED device having an ethernet connection and there should be a way for a LED device to say hello automatically to a Media Server and to describe itself to it. It would be so cool if a LED device could contact MediaMaster and configure itself automatically, it would explain it’s capacities saying “I am an LED device having 48 by 12 pixels and I expect pixels in the formats of 5 bits or red green blue”… Of course to make this economically practical the LED devices should not have a too expensive processor, you don’t want to add a PC behind every light 🙂

That’s the prototype we built lately, it uses an inexpensive open-source electronics prototyping platform called Arduino, here is a video explaining this:

If you want to know more details, here is a start:

A technical introduction to Kling-Net

Creating a Plasma effect for the Arduino and the Sparkfun LED tile

After having discovered the Arduino and before attacking the network extension I wanted to create something fun with the board and the 8 by 8 LED tile.

So I came with the idea of using one old school plasma effect of ArKaos VJ and porting it to the Arduino.

Here is the result:

Basically there are 2 textures pre-computed at startup. They are moved on a circular motion.

The 2 textures are moved and summed and you obtain an height value for each pixel. To get a nice effect you then go through a color table that is also pre-computed at startup.

To have a nice rotation effect you shift the color table at each generation of a new image.

At the end of the video you have another simple loop I did to test my setup.

Here is the plasma code for the Arduino:

//
// Plasma generation for the Arduino and a RGB Serial Backpack Matrix from SparkFun Electronics
// Marco Hinic, built on top of the code of Ryan Owens
//

//Define the SPI Pin Numbers
#define DATAOUT 11//MOSI
#define DATAIN 12//MISO
#define SPICLOCK 13//sck
#define SLAVESELECT 10//ss

void LED_Setup()
{
//SPI Bus setup
SPCR = (1< 64 bytes
// 16 by 16 -> 256 bytes
// color table 256 bytes
//

#define PLASMA_W 8
#define PLASMA_H 8

#define TABLE_W 16
#define TABLE_H 16

unsigned char gPlasma[PLASMA_W*PLASMA_H];
unsigned char gTable1[TABLE_W*TABLE_H];
unsigned char gTable2[TABLE_W*TABLE_H];
unsigned char gColorTable[256];
float gCircle1, gCircle2, gCircle3, gCircle4, gCircle5, gCircle6, gCircle7, gCircle8;
int gRoll;

void Plasma_CalcTable1 ()
{
for (int i=0; i< TABLE_H; i++) { for (int j=0; j< TABLE_W; j++) { int index = (i*TABLE_W)+j; gTable1[index] = (unsigned char) ((sqrt(16.0+(PLASMA_H-i)*(PLASMA_H-i)+(PLASMA_W-j)*(PLASMA_W-j))-4) *5 ); } } } void Plasma_CalcTable2 () { for (int i=0; i< TABLE_H; i++) { for (int j=0; j< TABLE_W; j++) { int index = (i*TABLE_W)+j; float temp = sqrt(16.0+(PLASMA_H-i)*(PLASMA_H-i)+(PLASMA_W-j)*(PLASMA_W-j))-4; gTable2[index] = (sin(temp/9.5)+1)*90; } } } void Plasma_SetColor (int index, unsigned char red, unsigned char green, unsigned char blue) { unsigned char new_color = (red & 0xE0) + ((green & 0xE0) >> 3) + ((blue & 0xC0) >> 6);
gColorTable [index] = new_color;
}

double gRed, gGreen, gBlue;

#define color(u,a) (cos((u)+(a))+1)*127

void BuildColorTable()
{
double u;
int i;
for (i=0; i<256; i++) { u=2*PI/256*i; Plasma_SetColor(i,color(u,gRed),color(u,gGreen),color(u,gBlue)); } gRed+=0.05; gGreen-=0.05; gBlue+=0.1; } void Plasma_Setup () { gCircle1 = 0; gCircle2 = 0; gCircle3 = 0; gCircle4 = 0; gCircle5 = 0; gCircle6 = 0; gCircle7 = 0; gCircle8 = 0; gRoll = 0; for (int i=0; i

First contact with the Arduino

I bought a small Arduino board that has a small CPU to prototype some ideas about driving LEDs.

Here is the first test, it’s was quick to have something blinking!

I want to use that as a prototyping platform to develop a protocol to drive LEDs in a simpler way.

Today you drive LED or with DMX or with video converters. DMX is cool and inexpensive but difficult to setup and video converters are very expansive.

There should be a way to connect LEDs to a computer and having them recognized automatically by a VJ software…

If you are curious to see on how simple the code is, here it is:

// Writing to the RGB Serial Backpack Matrix from SparkFun Electronics
// Marco Hinic, built on top of the code of Ryan Owens
//

//Define the SPI Pin Numbers
#define DATAOUT 11//MOSI
#define DATAIN 12//MISO
#define SPICLOCK 13//sck
#define SLAVESELECT 10//ss

//Define the variables we’ll need later in the program
char color_buffer [64];

void setup()
{
//SPI Bus setup
SPCR = (1<