This project started as a custom built LED light box. The brainchild of John Baldwin, the idea was simple: make a handled cube with LEDs, and change the lights based on the movement of the box. By the end, we had a platform that would allow us to make multiple LED boxes act in unison.

Architecture

Blight consists of a master process and multiple node processes, where each node corresponds to a controllable LED box.

  • Control of the LEDs, as well as readings from the IMU, are done over I2C using the Pi4J library.
  • Communication between the nodes and master is done using Netty and UDT.
  • The UI is built using various libraries, including Angular, three.js, and D3.js.
flowchart TD
    
    bm[blight-master]
    
    subgraph node
        bn[blight-node]
        subgraph IMU
            subgraph L3GD20H
                gyroscope
            end
            subgraph L3GD20
                accelerometer
                magnetometer
            end
            subgraph BMP180
                barometer
            end
        end
        
        bn --> IMU
        bn --> LED
        bn --> Battery
        bn --> WiFi
    end
    
    ac[Access Point]
    WiFi --> ac
    bm --> ac
    ui[Web UI] --> bm

Through the UI, the user can submit a JavaScript control script that is sent and executed on any of the connected nodes. Using the API exposed to the control script, the user can subscribe to IMU telemetry and control the state of the connected LED strip.

blight-master

The master process runs on a machine that is connected to the same network as the WiFi access point used by the nodes. The nodes are discovered by the master using UDP messages that are broadcast until a connection is established. The UI is served by the master process and can be used to view and control the connected nodes.

blight-node

The LED box consists of a RaspberryPi, battery, WiFi dongle, RGB LED strip, and a 10 DOF IMU. The RaspberryPi needs to be pre-configured to connect to a WiFi access point (Internet optional) with a systemd service that starts blight-node once networking is ready.

Hardware

I designed a box in Blender to mount all the components, with guides for the LED strip. The box consists of two parts that can be 3D printed and then glued or screwed together.

L3GD20H: Gyroscope

LSM303DLHC: Accelerometer and Magnetometer

BMP180: Barometer

Resources

Spatial localization resources:

Resources on detecting patterned behavior. Specifically taps, knocks, and possibly gestures: