50 cubes with RGB LEDs, battery and accelerometer inside. Each cube can be given its own color. Colors can be determined for the input of the accelerometer or an external connector on the bottom side. At the moment, the cubes contain a stripped down version of the windchime engine. This makes it easy to program fluent transitions in the HSL color space. When in standalone mode, the input from the accelerometer is used to navigate through the H,S circle. When the cube starts up, it has the grayish color that belongs to the center of the circle. When the cube is tilted slightly to the left, the color will become more and more blue, until the border of the circle is reached. In this way the tilt of the cube is used to navigate through the whole circle. This approach makes it possible to navigate through a 2 dimensional color space instead of the conventional 1 dimensional H space found in common LED devices. The 2 dimensional map used in the current software is actually a projection of the full color 3 dimensional HSL color space, making it possible to dim the cube as well.
When the cubes are not touched for a certain amount of time, they will enter a sleep mode in which the luminance will slowly vary, creating a nice glow effect.
On the bottom side of the cube there are 2 push buttons, a DC connector to charge the battery and a data connector. This connector can be used to upload new firmware to the cube, so i can change its behavior without having to open the cubes again. But this port can also be used to communicate with the firmware, making it possible to send color commands to the cube, or read the accelerometer values from it.
The idea is to make a long link cable, linking all cubes together. One end of the cable will contain a DMX-in cube-out converter, so that all cubes can be controlled over DMX. The data connector also has a power pin, so the cubes can be powered and receive color data from 1 cable.
The accelerometers are not placed exactly 100% in parallel to the cube’s sides. Therefore is was necessary to write code to compensate for this deviation. This calibration code can rotate the XYZ values over 3 angles, to adjust the apparent orientation of the accelerometer. On top of that, the output of the accelerometers was analog, ranging from 0 to +vcc for values of -1.5g to 1.5. approximately. Zero g did not exactly produce an output of 0.5vcc. I also had to correct for this asymmetry. Together, my calibration code has 6 params, for which i found the values by trial and error. But i am sure there must be a way to calculate them from some measurement data.
Because this calculation needs at least 6 measurements (6 unknowns), and I need to calibrate 50 cubes, the calibration process will take up a huge amount of time. Especially when considering the noisy data from the accelerometer, requiring me to average over a longer time period. I decided to write a simpler calibration function. One that assumed that the angle of misplacement is so small that we can approximate it linearly (ha. here I reveal that i’m a physicist). Now the rotation and analog deviation from zero were mathematically the same problem, reducing the calibration to only three parameters. Even further simplifying the problem by only looking at the case the the bottom side is on the bottom, i can simply take one measurement for the X and the Y value (Where Z is the vector pointing to the ground), subtract these values from all further measurements, et voila: a very simple calibration. But it meets my demands for now: zero x,y reading when the cube is lying bottom-side down.
At the moment we are playing with the idea to use video tracking for the cubes. Their position, color, relative distance and angles can be used to control other software, like sequencers, synthesizers or visual effects that are present in the same room.
Started: September 2010.
In cooperation with Jonas Vorwerk.




