iPod + Arduino

hello iPod!

Jul 1st 2009
One Comment
respond
trackback

The iPod requires instructions to follow a specific order and to be in hexadecimal notation.

This instructions look something like this:

structure

The structure in this sentence is very important. The first two bytes are the header. It always expects this header to start listening.

Then it expects the length of what is going to follow.

Next is a mode. There are 5 available modes:

byte          mode

0×00 mode switching

0×01 voice recorder

0×02 simple remote

0×03 request mode status

0×04 advanced remote mode (AiR)

Next is a command. The command is the specific instruction in the mode. The list of commands will follow.

The next part is the parameter, some modes use the parameters and others don’t.

Finally there is a checksum that completes the byte structure. This is calculated with a formula:

int checkSum(int len, int mode, int command, int parameter(s)) {
int checksum = 0×100 – ((len + mode + command + parameter(s)) & 0xFF);
return checksum;
Serial.println (“checksum”);
}


This post is tagged , , , , ,

One Response

  1. Vidur says:

    Wow, thanks a lot for that post. I’ve been fiddling with the ipod breakout board forever without really understanding what was going on.

    Great post! :)

Leave a Reply

Categories