Ipod library problem

Hello, I’m posting because, while trying to compile this sketch for Ipod control found here http://scuola.arduino.cc/it/content/controlla-liphone-arduino-usando-podbreakout-v15,

// Simple example of using iPodSerial library to send
// Simple Remote Play command on the press of a button.
// This will alternate between Play and Pause on the iPod.
//
// Uses the Arduino Bounce library for debouncing.
// You can get this from
//http://arduino.cc/playground/code/Bounce
//

#include <SimpleRemote.h>
#include <Bounce.h>
 
const byte PLAYPAUSE_PIN = 2;
const byte NEXT_PIN = 3;
const byte PREV_PIN = 4;
const byte TSHUFFLE_PIN = 5;
 
 
const unsigned long DEBOUNCE_MS = 20;
 
Bounce play(PLAYPAUSE_PIN, DEBOUNCE_MS);
Bounce next(NEXT_PIN, DEBOUNCE_MS);
Bounce prev(PREV_PIN, DEBOUNCE_MS);
Bounce tshuf(TSHUFFLE_PIN, DEBOUNCE_MS);
SimpleRemote simpleRemote;
 
void setup()
{
  pinMode(PLAYPAUSE_PIN, INPUT);
  pinMode(NEXT_PIN, INPUT);
  pinMode(PREV_PIN, INPUT);
 
  // enable pull-up
  digitalWrite(PLAYPAUSE_PIN, HIGH);
  digitalWrite(NEXT_PIN, HIGH);
  digitalWrite(PREV_PIN, HIGH);
    digitalWrite(TSHUFFLE_PIN, HIGH);
 
  simpleRemote.setup();
}
 
void loop()
{
  simpleRemote.loop();
 
  if (play.update())
  {
    if (play.read() == LOW)
    {
      // prod the iPod in case it went to sleep since we last talked to it
      // (after which older iPods will stop responding to us otherwise)
      simpleRemote.sendiPodOn();
      delay(50);
      simpleRemote.sendButtonReleased();
 
      simpleRemote.sendPlay();
    }
    else
    {
      simpleRemote.sendButtonReleased();
    }
  }
  if (next.update())
  {
    if (next.read() == LOW)
    {
      // prod the iPod in case it went to sleep since we last talked to it
      // (after which older iPods will stop responding to us otherwise)
      simpleRemote.sendiPodOn();
      delay(50);
      simpleRemote.sendButtonReleased();
 
      simpleRemote.sendSkipForward();
    }
    else
    {
      simpleRemote.sendButtonReleased();
    }
  }
  if (prev.update())
  {
    if (prev.read() == LOW)
    {
      // prod the iPod in case it went to sleep since we last talked to it
      // (after which older iPods will stop responding to us otherwise)
      simpleRemote.sendiPodOn();
      delay(50);
      simpleRemote.sendButtonReleased();
 
      simpleRemote.sendSkipBackward();
    }
    else
    {
      simpleRemote.sendButtonReleased();
    }
  }
  if (tshuf.update())
  {
    if (tshuf.read() == LOW)
    {
      // prod the iPod in case it went to sleep since we last talked to it
      // (after which older iPods will stop responding to us otherwise)
      simpleRemote.sendiPodOn();
      delay(50);
      simpleRemote.sendButtonReleased();
 
      simpleRemote.sendToggleShuffle();
    }
    else
    {
      simpleRemote.sendButtonReleased();
    }
  }
}

I get this error from the IDE:

ipodnuovo.cpp.o: In function `setup':
/home/roberto/arduino-1.0.3/ipodnuovo.ino:39: undefined reference to `iPodSerial::setup()'

It seems this line causes the problem:

  simpleRemote.setup();

I’m using IDE 1.0.3 under Ubuntu linux 12.04
Anyone had the same issue or has any idea how to fix it?
Thanks.

#include <WProgram.h>

That won’t work on 1.0.3. That library has not been upgraded for 1.0.3.

Thanks for your quick answer!
So I will try to modify the string
#include <WProgram.h>
with #include <Arduino.h>

in IpodSerial.h as in other libraries not updated for 1.0

It still doesn't work, =( =( =( =( =( =( =( because IpodSerial.h had already a statement wiche included Arduino.h for IDE above 1!! Is there anyone with the same issue? Thanks for answers!

It still doesn’t work, smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry smiley-cry because IpodSerial.h had already a statement wiche included Arduino.h for IDE above 1!!

Not in the version I downloaded from the link you provided. I edited Bounce.cpp, iPodSerial.h, and SimpleRemote.h and changed WProgram to Arduino in all three.

Then, I got just one error when compiling your code:

Binary sketch size: 5,690 bytes (of a 258,048 byte maximum)

Most people prefer to see this “error”.