Downtown Los Angeles has a monthly Artwalk on the second Thursday of  each month.  There are a host of galleries, street performers, musical acts that fill the street with art enthusiasts from all over the LA and OC area.

Windows on the high rise housing units are typically HUGE and are the perfect canvases for light installations.  I had always wanted to do some type of autonomous light show from my window.  During the July Artwalk, I was knee deep in development of the SOTU system  and it just so happened to be at a level of maturity that it was ready for some real exercise.  I’m all about knocking two things out with one punch.

The idea I was simple.

  • + Put a giant “#DTLA” in my living room window.
  • + Wire the inside of the window with 60 LEDs
  • + Attach the  SOTU system to the LEDs
  • + Monitor Twitter for tweets containing #DTLA
  • + For every tweet that included #DTLA flash the LEDs a given color, then fade them out, creating a quick flash fade effect

The overall effect was to make a visible canvas from the street below with a lit up #DTLA every time a tweet was published with #DTLA.  I threw a couple of other secret triggers like #red, #blue, #green, and #flash (randomly flash between red, green, and blue 10 times)  which would light the window up those colors or run the flash sequence instead of the default white.

SOTU System

I used the SOTU OSC Server Python script I wrote (based on pyOSC) along with the SOTU Raspberry Pi to control the LED activation over my local network.  The OSC/LED interface was activated on the Raspberry Pi and set to listen for OSC messages from the script I wrote to poll twitter.  It would sit patiently, waiting for something to tell it what lights to light up.  Enter

Polling Twitter

Just about every time I’ve needed some type of Python library, boom.  There it is.  Maybe not the perfect incarnation, but close enough that it wouldn’t take too much editing to get to work the way you need.  Open source amor!!!

Tweepy is a library that allows you to do all sorts of useful stuff with data from Twitter.  The only function of this library I needed was the ability to poll Twitter for any tweet that had #DTLA (or any # I wanted to listen for) in it and be able to do something when that message was received.

Installing Tweepy is simple if you have setuptools installed (if not, don’t worry, it is equally as simple to get it from the Git repository):


easy_install tweepy.  done.

In order to use Tweepy you will need to register your application on the Twitter application management site here:, another straightforward well-defined process.

Code City

The software components of the system included – an OSC server script that ran on Raspbian Wheezy on a Raspberry Pi.  This would listen for OSC messages and convert them to lower-level pi-blaster commands which would ultimately trigger the RGB LED strips. – This is a modified version of one of the sample scripts in the Tweepy library.   I modified it to monitor Twitter for the # specified on the command line when running the script: <hashtag>.  This script ran in an Ubuntu VM on my laptop

The software portion of the system worked well. When I would tweet with #DTLA and #red|#green|#blue|#flash, my window would light up like a champ in near real-time. Unfortunately I don’t have any pics or video of it in action, but the one change I would make is to add more lights to make it much brighter and more visible from the sidewalk below. Nonetheless, a fun project converting live tweets to live lights!

On to the next…