Justintime4Java
  • Home
  • Blog
  • My Work
  • Old Projects
    • WiiControll
    • Barcode Reader
    • Mine Little Pony

Arduino Apple Remote

3/9/2013

0 Comments

 
Dear Princess Celestia, 

Recently, I have been been experimenting with an IR led with an my Arduino. Ken Shirriff made a library for recording and sending IR codes, but since I have yet to find an IR receiver, so I focused on sending signals.  I decided to attempt to emulate an Apple Remote since I could quickly see if it works as I coded it.  From a HiFiDUINO blog post, I found out that this remote is based on the "NEC" protocol and included the code sent by each button.  Each bit of data is defined by a pulse and a space of certain lengths.  Specifically for the Apple Remote, it sends 4 bytes of data.  In hexadecimal, it sends 0xEE and 0x87 followed by the command code and the remote ID.

However, directly passing these codes to the included "sendNEC()" function did not work.  I later realized that each of the four bytes of the data are sent least significant bit first; each byte is essentially sent backwards.  Instead of 0xEE870206, I had to use 0x77E4060.  This code was for the menu button on the Apple Remote, and testing it on an Apple TV, I was able to turn it on!  Using my calculator in programmer mode, I found out all of the other codes by flipping each byte.  To support different remote ID's, I added also conditional to use an alternate command code with the appropriate parity bit depending on the ID.

I have included my Arduino sketch and other information after the break.
appleremote.ino
File Size: 2 kb
File Type: ino
Download File

Your Faithful Student:
Twilight Sparkle



Websites I used during my research on IR protocols:

Description of the NEC protocol:
http://wiki.altium.com/display/ADOH/NEC+Infrared+Transmission+Protocol

Someone else's attempt to emulate an Apple Remote:
http://arduinostuff.jimdo.com/home/remote/ir-codes/

An instructable for an Arduino Apple Remote Shield:
http://www.instructables.com/id/DIY-Apple-Remote-Shield-for-the-Arduino/

HiFiDUINO's blog post on the Apple Remote:
http://hifiduino.wordpress.com/apple-aluminum-remote/

Ken Shirriff's blog post on his Infrared Remote library:
http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html
0 Comments

Your comment will be posted after it is approved.


Leave a Reply.

    Author

    Here's where I put stuff about my life and what I'm doing!

    Archives

    January 2014
    December 2013
    November 2013
    October 2013
    June 2013
    April 2013
    March 2013
    February 2013
    October 2012
    September 2012
    August 2012
    July 2012
    June 2012
    May 2012
    April 2012
    March 2012
    February 2012
    January 2012
    December 2011
    November 2011
    October 2011
    September 2011

    Categories

    All
    Tactile Tic Tac Toe

    RSS Feed

Powered by Create your own unique website with customizable templates.