Project: LEDGRID

published on April 7, 2012

Time range: 
March 2010 to May 2010
As a: 

School year: first master year, second semester.

In the “Mobile and Pervasive Computing” course, we’d get a hands-on introduction to basic electronics and Arduino. Then, we’d have to come up with a cool idea and execute on it in pairs. I worked with Jens Bruggemans..

We decided to build something like Monome, but:

  • no sound support
  • completely stand-alone instead of a pc dependency
  • much cheaper
  • apps (games), including multiplayer (still without a pc!)
  • emulator to develop apps on the pc, which is much faster than Arduino’s “code, build, upload, run, repeat” cycle

MPC emulator on OS X

We used the Arduino Mega, which didn’t have enough PWMs to steer 64 RGB LEDs. So we had to simulate this using timer interrupts and digital I/O. To facilitate this, I wrote the FlexiTimer2 library (based on the MsTimer2 library). The result is NUM_ROWS*INTENSITIES*REFRESH_RATE = 8*6*60 = 2880 interrupts/sec being used to successfully control 64 RGB LEDs with only 16 digital I/O pins. The color range is limited to 343 colors, because a LED can be enabled or disabled 6 times per refresh, hence there are 7^3=343 possible combinations.

As a consequence of this large number of interrupts, Arduino’s Serial was no longer reliable. We had to detect corruption and resend the data whenever this happened.

To switch to a different app, we used RFID tags. Apps included:

  • Remote Control, Remotely Controlled Display
  • Game of Life, Pong, Bomberman
  • HSV Color Wheel, Numbers, Paint

The LEDGRID Emulator is written in C++/Qt and is a cross-platform app (tested on OS X 10.6, Windows XP and Windows 7). It can run LEDGRID apps (which are written in C) without any modifications. It emulates Serial and the LEDGRID API. I also had to fork QextSerialPort to fix build issues on OS X and Windows.