My iTable is finally done!

Arduino + homemade coffee table + 64 LEDs = iTable.

My Moto Droid plugged into my iTable

My iPod Touch plugged into my iTable

Pics of the build process

Code
Uses the ipodserial and simple remote library from

and the LED control library from
http://www.arduino.cc/playground/Main/LedControl

#include <iPodSerial.h>
#include <SimpleRemote.h>
//We always have to include the library
#include "LedControl.h"
//We need to name buttons
const int PLAY_BUTTON = 0; // PLAY/PAUSE ON PIN 5
const int NEXT_BUTTON = 1; // NEXT TRACK ON PIN 6
const int PREVIOUS_BUTTON = 2; // PREVIOUS TRACK ON PIN 7
const int VOLUMEUP_BUTTON = 3; // VOLUME INCREASE ON PIN 8
const int VOLUMEDOWN_BUTTON = 4; // VOLUME DECREASE ON PIN 9
const int RANDOMON_BUTTON = 5; // TURN RANDOM ON/0FF ON PIN 10
const int IPODON_BUTTON = 6; // WAKE UP IPOD ON PIN 11
const int IPODOFF_BUTTON = 7; // MAKE IPOD SLEEP PIN 12

const long DEBOUNCE_MILLIS = 150; // DEBOUNCE USED TO CANCEL OUT ANY ACCIDENTAL BUTTON PRESSES
LedControl lc=LedControl(12,11,10,1);
unsigned long delaytime=350;
unsigned long delaytime1=250;
unsigned long delaytime2=150;
unsigned long delaytime3=75;
/* we always wait a bit between updates of the display */
int lastButtonState = LOW; // STATE OF THE BUTTONS
long lastToggleTime = 0;
SimpleRemote simpleRemote;
byte scroll[]={
B11111111,
B11110000,
B11111000,
B11111100,
B11111110,
B11111111,
B00001111,
B00011111,
B00111111,
B01111111,
B11111111,
B11111111,};
int charNum = 4;
byte zigzag1[]={
B00001111,
B00001111,
B00001111,
B00001111,
B11110000,
B11110000,
B11110000,
B11110000};
byte zigzag2[]={
B11110000,
B11110000,
B11110000,
B11110000,
B00001111,
B00001111,
B00001111,
B00001111};
byte q2[]={
B00001111,
B00001111,
B00001111,
B00001111,
B00000000,
B00000000,
B00000000,
B00000000};
byte q1[]={
B11110000,
B11110000,
B11110000,
B11110000,
B00000000,
B00000000,
B00000000,
B00000000};
byte q3[]={
B00000000,
B00000000,
B00000000,
B00000000,
B11110000,
B11110000,
B11110000,
B11110000};
byte q4[]={
B00000000,
B00000000,
B00000000,
B00000000,
B00001111,
B00001111,
B00001111,
B00001111};
byte chequers[]={
B10101010,
B01010101,
B10101010,
B01010101,
B10101010,
B01010101,
B10101010,
B01010101};
byte chequers2[]={
B01010101,
B10101010,
B01010101,
B10101010,
B01010101,
B10101010,
B01010101,
B10101010};
byte ring01[]={
B00000000,
B00000000,
B00000000,
B00011000,
B00011000,
B00000000,
B00000000,
B00000000};
byte ring02[]={
B00000000,
B00000000,
B00111100,
B00100100,
B00100100,
B00111100,
B00000000,
B00000000};
byte ring03[]={
B00000000,
B01111110,
B01000010,
B01000010,
B01000010,
B01000010,
B01111110,
B00000000};
byte ring04[]={
B11111111,
B10000001,
B10000001,
B10000001,
B10000001,
B10000001,
B10000001,
B11111111};
byte fill03[]={
B00000000,
B01111110,
B01111110,
B01111110,
B01111110,
B01111110,
B01111110,
B00000000};
byte fill02[]={
B00000000,
B00000000,
B00111100,
B00111100,
B00111100,
B00111100,
B00000000,
B00000000};
byte fill04[]={
B11111111,
B11111111,
B11111111,
B11111111,
B11111111,
B11111111,
B11111111,
B11111111};

void displaymatrix(byte matrix[]){
lc.clearDisplay(0);
for (int i=0 ; i<=7 ; i++){
lc.setRow(0,i,matrix[i]);
}
}

void fadeoutfunction(){
// Function turns on all LEDs, fades from full brightness
// to full off, fades up again to full on, and turns all off.

for (int j=15 ; j>=0 ; j--){
lc.setIntensity(0,j);
delay(100);
}
}
void fadeupfunction(){
// Function turns on all LEDs, fades from full brightness
// to full off, fades up again to full on, and turns all off.
for (int j=0 ; j<=15 ; j++){
lc.setIntensity(0,j);
delay(100);
}
}

void setup() {
  
pinMode(PLAY_BUTTON, INPUT); // SET ALL THE BUTTONS AS INPUTS
pinMode(NEXT_BUTTON, INPUT);
pinMode(PREVIOUS_BUTTON, INPUT);
pinMode(VOLUMEUP_BUTTON, INPUT);
pinMode(VOLUMEDOWN_BUTTON, INPUT);
pinMode(RANDOMON_BUTTON, INPUT);
pinMode(IPODON_BUTTON, INPUT);
pinMode(IPODOFF_BUTTON, INPUT);

lc.shutdown(0,false);          // The MAX7219 is in power-saving mode on startup we have to do a wakeup call
lc.setIntensity(0,8);          // Set the brightness to a medium values 
lc.clearDisplay(0);             // and clear the display 
simpleRemote.setup();
lc.shutdown(0,false);
lc.setIntensity(0,15);
}
void loop() {
//animation stuff
int index = 0;
displaymatrix(zigzag1);
delay(500);
displaymatrix(zigzag2);
delay(500);
displaymatrix(q1);
delay(250);
displaymatrix(q2);
delay(250);
displaymatrix(q4);
delay(250);
displaymatrix(q3);
delay(250);
displaymatrix(q1);
delay(250);
displaymatrix(q2);
delay(250);
displaymatrix(q4);
delay(250);
displaymatrix(q3);
delay(250);
displaymatrix(ring01);
delay(250);
displaymatrix(ring02);
delay(250);
displaymatrix(ring03);
delay(250);
displaymatrix(ring04);
delay(250);
displaymatrix(ring01);
delay(250);
displaymatrix(fill02);
delay(250);
displaymatrix(fill03);
delay(250);
displaymatrix(fill04);
delay(250);
lc.clearDisplay(0);
for (int j=0; j<=7; j++){
lc.setRow(0,j,scroll[j+index]);}
delay(150);
lc.clearDisplay(0);
index = 0;
delay(250);
lc.clearDisplay(0);
delay(250);
displaymatrix(ring04);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring03);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring02);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring01);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring04);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring03);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring02);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring01);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring04);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring03);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring02);
delay(250);
lc.clearDisplay(0);
displaymatrix(ring01);
delay(250);
lc.clearDisplay(0);
displaymatrix(fill04);
delay(100);
lc.clearDisplay(0);
delay(100);
displaymatrix(fill04);
delay(100);
lc.clearDisplay(0);
delay(100);
displaymatrix(fill04);
delay(100);
lc.clearDisplay(0);
delay(250);
//ipod stuff
simpleRemote.loop();
const int PLAY_BUTTON_STATE = digitalRead(PLAY_BUTTON);
const int NEXT_BUTTON_STATE = digitalRead(NEXT_BUTTON);
const int PREVIOUS_BUTTON_STATE = digitalRead(PREVIOUS_BUTTON);
const int VOLUMEUP_BUTTON_STATE = digitalRead(VOLUMEUP_BUTTON);
const int VOLUMEDOWN_BUTTON_STATE = digitalRead(VOLUMEDOWN_BUTTON);
const int RANDOMON_BUTTON_STATE = digitalRead(RANDOMON_BUTTON);
const int IPODON_BUTTON_STATE = digitalRead(IPODON_BUTTON);
const int IPODOFF_BUTTON_STATE = digitalRead(IPODOFF_BUTTON);
const long now = millis();
if ((PLAY_BUTTON_STATE != lastButtonState) && ((now - lastToggleTime) > DEBOUNCE_MILLIS))
{
if (PLAY_BUTTON_STATE == LOW)
{
simpleRemote.sendPlay();
}
else
{
simpleRemote.sendButtonReleased();
}
lastButtonState = PLAY_BUTTON_STATE;
lastToggleTime = now;
}
else if ((NEXT_BUTTON_STATE != lastButtonState) && ((now - lastToggleTime) > DEBOUNCE_MILLIS))
{
if (NEXT_BUTTON_STATE == LOW)
{
simpleRemote.sendSkipForward();
}
else
{
simpleRemote.sendButtonReleased();
}
lastButtonState = NEXT_BUTTON_STATE;
lastToggleTime = now;
}
else if ((PREVIOUS_BUTTON_STATE != lastButtonState) && ((now - lastToggleTime) > DEBOUNCE_MILLIS))
{
if (PREVIOUS_BUTTON_STATE == LOW)
{
simpleRemote.sendSkipBackward();
}
else
{
simpleRemote.sendButtonReleased();
}
lastButtonState = PREVIOUS_BUTTON_STATE;
lastToggleTime = now;
}
else if ((VOLUMEUP_BUTTON_STATE != lastButtonState) && ((now - lastToggleTime) > DEBOUNCE_MILLIS))
{
if (VOLUMEUP_BUTTON_STATE == LOW)
{
simpleRemote.sendVolPlus();
}
else
{
simpleRemote.sendButtonReleased();
}
lastButtonState = VOLUMEUP_BUTTON_STATE;
lastToggleTime = now;
}
else if ((VOLUMEDOWN_BUTTON_STATE != lastButtonState) && ((now - lastToggleTime) > DEBOUNCE_MILLIS))
{
if (VOLUMEDOWN_BUTTON_STATE == LOW)
{
simpleRemote.sendVolMinus();
}
else
{
simpleRemote.sendButtonReleased();
}
lastButtonState = VOLUMEDOWN_BUTTON_STATE;
lastToggleTime = now;
}
else if ((RANDOMON_BUTTON_STATE != lastButtonState) && ((now - lastToggleTime) > DEBOUNCE_MILLIS))
{
if (RANDOMON_BUTTON_STATE == LOW)
{
simpleRemote.sendToggleShuffle();
}
lastButtonState = RANDOMON_BUTTON_STATE;
lastToggleTime = now;
}
else if ((IPODON_BUTTON_STATE != lastButtonState) && ((now - lastToggleTime) > DEBOUNCE_MILLIS))
{
if (IPODON_BUTTON_STATE == LOW)
{
simpleRemote.sendiPodOn();
}
lastButtonState = IPODON_BUTTON_STATE;
lastToggleTime = now;
}
else if ((IPODOFF_BUTTON_STATE != lastButtonState) && ((now - lastToggleTime) > DEBOUNCE_MILLIS))
{
if (IPODOFF_BUTTON_STATE == LOW)
{
simpleRemote.sendiPodOff();
}
lastButtonState = IPODOFF_BUTTON_STATE;
lastToggleTime = now;
}
}

Nice project.

You have an LED out.

lol everyone keeps focusing on that darn LED.. yes i know it's out and i'm working on replacing it. not sure what happened. but at least the project lives! :slight_smile:

It lives and is a really nice project. :sunglasses:

I would have never noticed the led if it was not in one of your vids.

I was just picking fun :wink:

Nice work on the wood as well.

You do know that in the back of your mind you want to replace those with RGB LEDS anyway right. ;D

Honestly, nice work on the wood, finish and the electronics.

My friend Damion who helped with the project in his garage wanted to go with RGB to begin with. I had hard enough time figuring out the 8X8 with just RED. EVERYTHING I found was for 5X7 matrices. Maybe next time it will be 8x8 RGB. Also I only put it in the video because apparently my friends are OCD and pointed it out lol. Thanks again guys for the nice words. Now maybe I'll get some help for my next project.... a wireless (wi-fi) enabled universal remote controllable from your iPad, Phone, PC, ect. but that is a whole 'nother post.

I'm hoping this makes it on HackADay or HackedGadgets.

Update:

It's made it on HackedGadgets.com and HackADay.com!