ESP32: How to Read Signals from an Infrared (IR) Remote

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 พ.ค. 2024
  • In this video I'll explain the basics of connecting an ESP32 microcontroller to an Infrared (IR) sensor, how to install the necessary library into the Arduino IDE and how to run a sample sketch which displays the codes from a remote. Finally, I show how to modify the code with conditions that trigger when a particular remote button is pressed.
    If you have questions or comments, please leave them below or send me an email:
    brandon@baldguydiy.com
    Thanks for watching!
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 17

  • @finnsjustanotherday1481
    @finnsjustanotherday1481 16 วันที่ผ่านมา

    Great video. Going to try this on my lunch break. I forgot my IR capture card in Florida and need to get a HDMI switches IR code captured so I can upload it to an RTI automation system

  • @child_of_god_
    @child_of_god_ ปีที่แล้ว

    been looking for this, thanks

  • @hal8000b
    @hal8000b 10 หลายเดือนก่อน +1

    Nice video. @4:31 you describe the long string of "F" chars. This is not noise but the repeat value when any IR remote key has a long press.
    @4:48 you decode a key using results.value This is not too well explained and its a problem for any beginner starting in C language. This value is derived from one of the #include files, in particular IRrecv.h
    You will find at line 99 that a class called "decode_results" is defined. A structure is set up allowing you to view the decoded value, address and command.
    Adding a line to your program:
    Serial.println(results.command);
    Will also display the integer value of the command used. This could prove useful in some projects.
    My explanation is also not explained well, but it is nearly always required to read through the header files in most programs for a better understanding.

  • @flyerminer
    @flyerminer ปีที่แล้ว

    Great video! I'm new to ESP32. My project I'm working on right now is to trigger a few existing IR-driven devices in my home on a schedule. I've already managed to get the ESP32 talking with the automation software I'm using.
    I'm using IR since it's already a part of the devices I'm wanting to run and I don't want to modify them by directly tapping into signal wires (a bit too invasive for my purpose). I need to emulate the existing IR signal so I need to know what the code I'm going to be broadcasting is - this will help me figure out what signals to send!
    Thanks!

  • @drzacks
    @drzacks ปีที่แล้ว

    Thanks for the video, really helpful to me. I am using for control ESP32 media player. What should I do if I want to code number 10 for example, using that remote controller?

  • @BlondieSL
    @BlondieSL ปีที่แล้ว

    In looking at that shield, I have to wonder if part of the reason there are mis-reads, might be due to the use of an LED, connected to VCC then through a 1K resistor to the DATA line.
    That could easily cause the data line to be slightly lowered so when a signal is received, it's "strength" might be negated somewhat.
    Personally, when I get my shipment in, I think that I'll use a transistor to trigger the Rx LED, making sure that there's very little load on that data line.
    Secondly, while I haven't checked the datasheet on the VS1838B (TL1838B), but I wonder if, like some other components, that it might need a slight "resting/resetting" period (perhaps 5ms) before receiving the next signal.
    I'll play with those ideas when my shipment arrives.
    In my case, I have a Channel Master CM-7000pal DRV to record HD TV shows off-the-air.
    Actually, 2 of these DVRs.
    One is just fine and is used in the bedroom.
    The other is one I picked up for cheap and did some repairs to the PCB.
    The problem is that I totally forgot the trash batteries in it since last summer!!
    Sadly, not only did they leak, but with the position/angle that the remote was sitting, it leaks all down the PCB, onto the button contacts and some chips.
    I've done a complete cleanup on it, but it's still not working.
    So, the other machine's remote is fine and I want to build a new remote using ESP32 WROOM to capture all the buttons. Basically making a duplicate of the remote.
    While I'm at it, if that works out well, I may install an SD card and create categories to capture remote codes from the TV as well, so 1 remote does all.
    I'd want to save all that to the SD card, of course.
    oh what fun.

  • @M3t4lstorm
    @M3t4lstorm 2 ปีที่แล้ว +5

    The FFFFFF just means the previous command/signal/button was repeated (like holding it down).

    • @BaldGuyDIY
      @BaldGuyDIY  2 ปีที่แล้ว +2

      Thanks for watching! Good feedback!

  • @Alikhan-uv6us
    @Alikhan-uv6us 2 ปีที่แล้ว

    hello sir
    i need to ask that how can i use print and scan code in esp 32 ?

    • @BaldGuyDIY
      @BaldGuyDIY  2 ปีที่แล้ว

      I’m not sure what you mean. Could you provide more detail?

    • @Alikhan-uv6us
      @Alikhan-uv6us 2 ปีที่แล้ว

      @@BaldGuyDIY i mean to say like we used print and scanf code in c programming. can i use it here. actually i want to do something like this. when my esp 32 is connected to screen and keyboard whatever i type on keyborad i should show it on the screen.

    • @BaldGuyDIY
      @BaldGuyDIY  2 ปีที่แล้ว

      Hi Ali, I’m not sure, I haven’t done a project like that before. Besides looking online for something similar, I don’t have any other suggestions for you at the moment. You can communicate with the ESP32 over a lot of different wired and wireless protocols, but you’d have to do some reading up to know which to use for your needs.

    • @AuxiliaryPanther
      @AuxiliaryPanther ปีที่แล้ว

      @@Alikhan-uv6us C programming is a little different, for example Arduino uses the "Serial.print" command. Do a little more research and you'll find a video for anything using Arduino.

    • @Alikhan-uv6us
      @Alikhan-uv6us ปีที่แล้ว

      @@AuxiliaryPanther thankyou mate i already did it ❤

  • @DurgaPrasad-gn6et
    @DurgaPrasad-gn6et 2 ปีที่แล้ว

    Sir please provide code in description

    • @BaldGuyDIY
      @BaldGuyDIY  2 ปีที่แล้ว

      Send me an email and I will send you the code I used.

    • @AuxiliaryPanther
      @AuxiliaryPanther ปีที่แล้ว

      He uses an example program that will be available in the Arduino IDE when you install the library he mentions.