The 4x4x4 iPhone controlled RGB LED Cube


I recently ordered a 4x4x4 RGB LED kit that came fully assembled from Seeedstudio for $100. Similarly, like an RGB LED light bulb, I wanted to have some form of control over the cube from my iPhone. Thus, I set out to research for possible solutions, and here is my result after the break.


The cube uses a Rainbowduino (Arduino compatible) controller, and hooks up via PC to Processing, where it listens for certain values. Those values are sent to the PC via an app called TouchOSC on my iPhone. There is a Processing library called oscP5, which simply reads the values being sent from the iPhone over your local network, and writes them to the serial port. OSC stands for Open Sound Control, and is a communication technique meant for DJs, so that they can control MIDI interfaces and other equipment.

You will need to buy the TouchOSC iPhone app, and download the PC design tool to make your own button layout. Be sure to modify the code accordingly though.

Here is the sketches that I have written for both Arduino and Processing if you want to try it out yourself:


Download links:
http://www.4shared.com/file/7icbS1cF/RGBCube.html (.ino for Arduino)
http://www.4shared.com/file/4QtKfQBL/RGBCube.html (.pde for Processing)

9 comments:

  1. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Hello,
      I believe that I have provided all the necessary information already.
      There is a library named oscp5 (link above) which you will need to load into processing.
      And in the touchosc app template maker (available off their website) I had three faders 1-3. Hopefully you can see where those are in the code given above.
      And yes it's all wireless.

      -Ken

      Delete
  2. This comment has been removed by the author.

    ReplyDelete
  3. You need to make a template with the TouchOSC designer for PC that has three faders.

    Then try to understand the processing code that I posted and ensure that the fader numbers are correct, etc.
    Also I'm assuming that you've already established COM serial port communication with your cube, if not, then you should do a little research.

    ReplyDelete
  4. This comment has been removed by the author.

    ReplyDelete
  5. If your cube is plugged into your PC via USB, then it should automatically have the COM serial port configured. To see which COM port, you can view it from the dropdown menus on the Arduino IDE.
    If you need to change the number port for whatever reason, you can do that in Hardware devices in your Control Panel.

    ReplyDelete
  6. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. You need to have the sketch uploaded to the cube, and have the processing script running. In the touchosc app, ensure you are connecting to the proper local ip and ports of your computer running processing which the cube is connected to. Ex. My computers ip is 192.168.1.100

      Delete
  7. This comment has been removed by the author.

    ReplyDelete