Trying to decode an IR signal for replication

Discussion in 'Programmer's Corner' started by magnet18, Oct 12, 2012.

  1. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    Hi all
    I'm currently undertaking a small project, the goal is to replicate the IR codes from an xbox 360 media remote using an arduino, particularly the next song code. I took apart the remote, hooked it to the o-scope and produced the attached results (I cut off the beginning before the signal started and the end after so the file would be small enough to upload). All the values are negative because if I switched the leads, the LED would come on and stay on(thank goodness for cellphone cameras), presumably because of grounding.

    Anyway, I got that, and I can easily load it into matlab or excel and invert the values, clear the noise and convert to binary by dividing everything by 2 and then rounding up, and arrive at a picture of somewhat what the code looks like, in 40us increments.

    My trouble is this, How do I take that, and make it into a code I can put on the arduino? Hopefully not by hand. :p
    What is the standard length of time for a bit in a code like this?

    Any help from those with experience in this area would be great.
    Thanks!
     
  2. vortmax

    Member

    Oct 10, 2012
    103
    18
  3. magnet18

    Thread Starter Senior Member

    Dec 22, 2010
    1,232
    124
    Thanks for the links, very helpful :)
     
Loading...