Shop OBEX P1 Docs P2 Docs Learn Events
Make Universal IR Remote — Parallax Forums

Make Universal IR Remote

PodionPodion Posts: 90
edited 2014-01-15 08:52 in Robotics
Hi all

I'm getting started whit a new project.


I look on OBEX and I check the Magic IR. I found this really interning.

The only thing is that I don't find the way to display in PST the IR code that the Magic IR program record. If I want to display the code or the sequence is because I need to copy it in a variable such as (TV_ON), (Light_OFF), (Music_OFF) that contain that sequence to use in other program.

Do you know how to find the sequence that was recorded by the Magic IR ?

magic_ir_demo - Archive.zip

Comments

  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-18 14:42
    Have you seen Ragtop's project?

    I was under the impression he was pretty far along with a universal remote.

    I've attached the code I was working on back in January of 2011. It's got to be full of bugs and when I just looked at it I had no idea what the heck I was doing.

    If you try to use my code and get stuck, let me know I'll attempt to decipher it.

    Edit: I also uploaded magicIrDemo which I think isn't as complicated. Hopefully it will be easier to make some sense of it.
  • PodionPodion Posts: 90
    edited 2013-09-18 15:40
    WAW you just resolve my problem !!! thank you so much !!! Whit this now I'm going to be able to create my program and control all my electronic stuff !
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-18 15:48
    Podion wrote: »
    WAW you just resolve my problem !!! thank you so much !!! Whit this now I'm going to be able to create my program and control all my electronic stuff !

    I keep meaning to get back to this myself. I hope you keep us posted on your project.
  • PodionPodion Posts: 90
    edited 2013-09-18 16:20
    The MagicIrdemo you have post work great but I think it as a bug or something else. Wen I do a power cycle and play a code, the code are display in PST but the code is not transmit .. I have to record the code again.
    I check the "D" option and all the code are there. I'm not shore what is going on.

    Do you have an idea ?

    For shore I will post the project
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-18 16:33
    Podion wrote: »
    Do you have an idea ?

    My first idea is the code is buggy.

    I just looked at it again and nothing jumps out at me.

    IIRC, MagicIr records the pulse times relative the start of the recording process rather than just the pulses' duration. I don't think I had fixed that yet.

    I saw my breadboard with IR LED and sensor a couple of days ago. I'll try to find it again and play with the demo to see if I can find the bug.
  • PodionPodion Posts: 90
    edited 2013-09-18 16:35
    The trouble is from the line in red. i think the recordFlag is reset on power cycle.

    Edit: If I delete this line it work fine after power cycle.

    if recordFlag[localButton] == 1
    Debug.str(string(13, "Playing IR code."))
    repeat 10 '3
    magicir.playcode(20, @code1 + (128 * 4 * localButton) , codeLength[localButton])
    else
    Debug.str(string(13, "No IR code recorded yet."))
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-18 17:01
    Podion wrote: »
    The trouble is from the line in red. i think the recordFlag is reset on power cycle.

    That's odd. I can see where recordFlag is written to the EEPROM in the Record method.
      eeprom.FromRam(@recordFlag + (localButton * 4) , @recordFlag + (localButton * 4) + 3, @recordFlag + (localButton * 4))    
    

    I haven't found the bug yet.
  • Beau SchwabeBeau Schwabe Posts: 6,559
    edited 2013-09-18 17:22
    There is also this in case you are trying to decode an obscure remote that might have a non-standard IR sequence...


    "Uses Assembly to record the Mark and Space data of the IR signal. Fixed Mark, Fixed Space, and Manchester coding detection across several odd-ball remotes. Compression techniques applied for a smaller data representation footprint. Supports Pattern matching, and re-transmission of stored IR sequences."

    http://obex.parallax.com/object/292
  • Duane DegnDuane Degn Posts: 10,588
    edited 2013-09-18 18:35
    I'd go with Beau's object.
  • PodionPodion Posts: 90
    edited 2014-01-15 08:52
    Little update of my project.

    I use a PIR sensor to send IR code to my device ( light, music etc.)

    I just make some little change in the original code. If your interest just run the magicIrDemo101211b_test.spin

    It work well for my and let me know if it does work whit you.

    Instruction

    You just run the program and record some IR code and test it then select the one you want to play wen the PIR sensor (or anything you want) is activate.magicIrDemo101211b_test - Archive [Date 2014.01.15 Time 11.49].zip
Sign In or Register to comment.