My first Arduino project

First of all I'm not sure if this is the right section or not, my apologies if not.

I would like to make one of these: http://www.instructables.com/id/How-to-build-a-Daft-Punk-Table-Replica/ but take it a few steps further. I would like to put in a speaker to play music from a line in (iPod, Zune, etc) or an SD card. Also put a microphone in for parties so it reacts to the sound around the table. I would also like it to play pong (1 and 2 players).

I know I'll need a few ICs (suggestions?) I will most likely use one of those small LCD screens for the menu, options, score board for pong etc.

My question to you all are these:

What kind of LEDs?
What type of LCD display (it wouldn't have to be to big)
Can the Arduino handle all of this?
Foreseen problems and any suggestions around said problems?
Is this to ambitious of a first project? Maybe I could take out a few features and add them down the road?
Did I miss anything?

Thanks ahead of time for any and all help.

also I'll probably be using something like this for the iPod control

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1165287593

basically posted it so I wouldn't forget the link.

You might want to start by looking through the LED tutorials + info here:
http://www.arduino.cc/playground/Main/InterfacingWithHardware#Output

Do some breadboarding to get the basic display circuit working, then sort out how to interface with the ipod (no idea). The gist- break it down into chunks of work that you can do and test as you go.

Thanks, I've found a lot of links on the iPod with the arduino (Arduino As IPod Remote Control | Hackaday) so once I get the ball rolling (I'm waiting on my bread board atm) I'm hoping I can piece it all together and, like you said, test one part at a time. Any idea on the speaker system? I was thinking about using the altoids amp (http://www.instructables.com/id/Altoids-Amp/) to run the speakers and having a line in go from the ipod/zune/whatever to the amp to the speakers with a headphone splitter going to the arduino so it can do the animations to the music. sound good? also any ideas on the mic to listen to the ambient sounds and or the pong controls i should use?

Seems I have found my first snag... I cannot get the Arduino to communicate with Windows 7. Guess I'll have to re-install XP.

I'm on a Mac - but you might want to check this thread before taking drastic action :slight_smile:

http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1248192066

I tried re-installing that and it didn't work. I like Windows 7 don't get me wrong but my computer is really old and it runs better with XP anyway; plus I have everything that is important backed up so I think tomorrow I'm going to hunt down a bread board and install XP and get the ball rolling on this thing. :slight_smile:

I believe I'll start by following this tutorial for the 8X8 LED segment
http://www.arduino.cc/playground/LEDMatrix/Max7219

what MAX7219 should I get? and how many would I need to pull everything off?

also what LCD screen would you recommend? it will just have a few lines of text for the menu,score in pong, track info when using the ipod etc...
http://www.sparkfun.com/commerce/advanced_search_result.php?keywords=lcd&x=0&y=0&search_section=products

i just ordered the iPod breakout board PodBreakout - DEV-08295 - SparkFun Electronics

didn't get XP installed (the disc is way to scratched) so i'm running ubuntu 9.04 but the good news is i got the arduino working! so i'm just waiting for the breadboard and other parts to come in!! :slight_smile:

My breadboard, iPod breakout board, and everything else (minus the ICs) finally came in the mail! My fist question is could I make this iPod Remote | David Findlay without the voltage thing? Since the Arduino has both 3.3V and 5V? I don't want to try it and break something and I know he is using the nano and I wasn't sure if the nano had the same voltages as the regular Duemilanove.

the MAX7219s came in today! time to start wiring it up. i found this Arduino Playground - Max7219 but it doesn't say where or what wires go into the arduino do i need a resistor for the MAX7219 (i'm only going to use one of them)... i know i'm asking a lot of questions but i really don't want to fry anything.

Take a look at the PDF w/ that article:
http://tomekness.files.wordpress.com/2008/01/max7219_tutorial_pre_c.pdf

Yes, you need the resistor- it sets the brightness/protects the LEDs

Thank you I got some resistors and caps from Radio Shack and hopefully soon I'll have my LED's. The table is pretty much done! We went to Lowe's and Home Depot around 9PM and built it overnight I don't think we stopped until around 8 or 9 AM. It was kinda a spur of the moment build so I didn't have my camera, just my cell phone. You can take a look at the photos here: iTable | Flickr

Also I need suggestion on LEDs. The table is going to be etched glass with a "tic-tac-toe" like box holding each LED. I would like it to be really bright so would I need a diffused LED if the glass is going to be etched? I would like the whole square to light up not just a red dot. Also how many thousand mcd's should it be? the boxes will be 2 inch by 2 inch square so it doesn't have to light up a whole room or anything I just want a solid red to show through the glass.

OK the table is pretty much done (the table not the actual programming/etc) I wanted to add a headphone amp so the ipod can play music and hid the speakers under the table. the amp i'm using is going to be this one Robot or human? and to talk to the ipod i'm following this guide iPod Remote | David Findlay my question is this: if the amp takes 2 AAA batteries (2X1.5=3V right?) could i use another one of these http://www.sparkfun.com/commerce/product_info.php?products_id=8745 and run it off the arduino as well? it will be 3.3V but will that matter? I'm using a 9V wallwart type thing to power the arduino.

update for those of you still following along.

just got the ipod dock complete...still waiting on LEDs and a few other things though but the project is coming along. anyone know how to read the ID3 tag from an ipod and display it on an 8X8 matrix of LEDs? that would be amazing :slight_smile:

/*******************************************************************************
* Copyright (c) 2009 David Findlay
* All rights reserved.
* Modified by Dustin Evans 2010-02-11 evansdustin08@gmail.com www.MyArduinoProjects.BlogSpot.com
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
* - Redistributions of source code must retain the above copyright notice,
* this list of conditions and the following disclaimer.
* - Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
* POSSIBILITY OF SUCH DAMAGE.
******************************************************************************/
#include <8X8Pattern.h> // 8X8 LED MATRIX LIBRARY (NOT USED IN THIS EXAMPLE)
#include <SimpleRemote.h> // USED FOR SIMPLE REMOTE COMMANDS
#include <iPodSerial.h> // USED TO COMMUNICATE TO THE IPOD
const int PLAY_BUTTON = 5; // PLAY/PAUSE ON PIN 5
const int NEXT_BUTTON = 6; // NEXT TRACK ON PIN 6
const int PREVIOUS_BUTTON = 7; // PREVIOUS TRACK ON PIN 7
const int VOLUMEUP_BUTTON = 8; // VOLUME INCREASE ON PIN 8
const int VOLUMEDOWN_BUTTON = 9; // VOLUME DECREASE ON PIN 9
const int RANDOMON_BUTTON = 10; // TURN RANDOM ON/0FF ON PIN 10
const int IPODON_BUTTON = 11; // WAKE UP IPOD ON PIN 11
const int IPODOFF_BUTTON = 12; // MAKE IPOD SLEEP PIN 12
const long DEBOUNCE_MILLIS = 150; // DEBOUNCE USED TO CANCEL OUT ANY ACCIDENTAL BUTTON PRESSES
int lastButtonState = LOW; // STATE OF THE BUTTONS
long lastToggleTime = 0; // TOGGLE TIME USED TO CALCULATE BETWEEN NOW AND DEBOUNCE
SimpleRemote simpleRemote;
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);
// turn on the pull-up resistor for example using Arduino resistor. in actual program won't need this
digitalWrite(PLAY_BUTTON, HIGH);
digitalWrite(NEXT_BUTTON, HIGH);
digitalWrite(PREVIOUS_BUTTON, HIGH);
digitalWrite(VOLUMEUP_BUTTON, HIGH);
digitalWrite(VOLUMEDOWN_BUTTON, HIGH);
digitalWrite(RANDOMON_BUTTON, HIGH);
digitalWrite(IPODON_BUTTON, HIGH);
digitalWrite(IPODOFF_BUTTON, HIGH);
simpleRemote.setup();
}
void loop()
{
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;
}
}

This is for the Simple Remote commands.

Total you can use these functions:

    void sendButtonReleased();
 
    void sendPlay();
    void sendVolPlus();
    void sendVolMinus();
    void sendSkipForward();
    void sendSkipBackward();
    void sendNextAlbum();
    void sendPreviousAlbum();
    void sendStop();
    void sendJustPlay();
    void sendJustPause();
    void sendToggleMute();
    void sendNextPlaylist();
    void sendPreviousPlaylist();
    void sendToggleShuffle();
    void sendToggleRepeat();
    void sendiPodOff();
    void sendiPodOn();
    void sendMenuButton();
    void sendOkSelectButton();
    void sendScrollUp();
    void sendScrollDown();

but I'm only using the ones in my code as of right now. I got the libraries from a guy who was featured on www.hackaday.com his website and source code can be found here:
GitHub - finsprings/arduinaap: An Arduino library for controlling iPods (and some features for the iPod app on iPhones and iPod Touches) via the Apple Accessory Protocol (AAP)

he has libraries for Simple Remote (that I'm using) as well as Advanced Remote.

Pictures/updates/videos of my project can be found here: