LEDRoom – Keep It Up

Keep It Up is an interactive sketch that utilises the “Gravity” feedback of a phone to alter the lighting of a room by an RGB LED strip. As the phone rises, the brightness of the strip increases; and while the phone falls, the LEDs will dim.

The phone’s gravity feedback is extracted by ZIG SIM and processed by Processing 3.0. In the floats x, y, z, the data of the phone rising, falling, and staying stationary is trained as three gestures in Wekinator.

Successful gesture matches are relayed back to Processing which then sends OSC data to an Arduino UNO affecting the LED strip. I used LP’s Zig2Weki.pde, MAXtoArduino.ino as a base for my eventual program.

//processing code communicating w arduino

void draw() {
  background( r, r, r) ;

  //writing to arduino
  myPort.write(255); //dead value?
  myPort.write(r); //r

  if (value == 1) { //outX returns value = X
    r = r+30;
  } else if (value == 2) {
  } else if (value ==3) {
    r = 0;

  if (r >= 255) {
    r = 255;
  if (r <=0 ) {
    r = 0;

As I was only focusing on increasing/decreasing the brightness of the LED strip, I really only needed to send one value over from Processing so my RGB would be (r,r,r).

Overall, this was a fun sketch to play with and explore the data feedback that a phone can record. It was also interesting to see how after a few takes of tossing my phone back and forth, my friends stopped caring about dropping it and just went for it.

Storyboard for video:

Leave a Reply