Other ways to send IR commands?

Hello. 

I am working on a large futuristic train/spaceport layout, and I was wondering if it is possible to control the IR receiver for lights using an infrared LED controlled by the raspberry pi. I saw in one of the other topics in this section that a smartphone can do it, and I am curious if the protocols necessary to do this are published for implementation in my custom RPi control program.

Thanks.

8replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Hi  Jeremiah Shue , thanks for the question.  It should definitely be possible, assuming you are able to send IR signals using the NEC encoding protocol.  Here are the codes corresponding to each button on the remote:

     

    /* Define the IR remote button codes. We're only using the
       least significant two bytes of these codes. Each one 
       should actually have 0x10EF in front of it.*/


    const uint16_t BUTTON_POWER = 0xD827; // i.e. 0x10EFD827
    const uint16_t BUTTON_A = 0xF807;
    const uint16_t BUTTON_B = 0x7887;
    const uint16_t BUTTON_C = 0x58A7;
    const uint16_t BUTTON_UP = 0xA05F;
    const uint16_t BUTTON_DOWN = 0x00FF;
    const uint16_t BUTTON_LEFT = 0x10EF;
    const uint16_t BUTTON_RIGHT = 0x807F;
    const uint16_t BUTTON_CIRCLE = 0x20DF;

     

    Hopefully this helps!  Keep us posted and if you do implement custom control, show us your setup in action!

    Reply Like
  • Thanks for your quick reply. I had initially forgotten about IR control when I planned to DIY-cable the light circuits directly to the GPIO pins on the Pi. This way will look much cleaner, and since all my lights are currently on the big hangar build, I can have a high spot to put the receiver.

    Also, by the way, I am using the Pi because I also want to have automated train track switches from 4dbrix. 

    Reply Like
  • Jeremiah Shue Sounds like a cool project!  Please do keep us updated.

    Reply Like
  • Current progress:

    Conversing with 4dBrix about ways to integrate their hardware and the IR control for the lights. 

    Bought a 4x8 sheet of 15/32 plywood to use as my table top. I'm going to try to fit the control console inside a drawer unit I found on the side of the road (cheapskate, I know, but it was in great shape and I'm on a budget. 

    No pictures yet, but I'll try to get one once the table is cut and built and the hangar MOC and track layout have been built.

    Reply Like
  • Perhaps I should create my documentation topic under a different name and in a different section?

    Reply Like
  • also, couple of questions about the forum software:

    1. How do I edit posts?

    2. Somehow I created a dupe account by forgetting which email address I used. Jeremiah Shue can be deleted please, I will use my original account from now on. Sorry about that.

    Reply Like
  • Jeremiah Shue No problem, account removed.  Also, to edit posts, there should be a little gear logo in the top upper right corner of each post:

     

     

    Do you see that?  That should allow you to edit your posts.  If not let me know.

    As for creating a new post, that's definitely up to you.  Maybe in this category:

     

    https://forum.brickstuff.com/category/customer-tips-and-tricks

     

    Keep us posted on your progress, and as always, let us know how we can help.

    Reply Like
  • That looks like an admin/mod only menu. all I get are three dots that reveal "Report post"

    Reply Like
Like Follow
  • 2 mths agoLast active
  • 8Replies
  • 19Views
  • 3 Following