Arduino Tutorial 31- How to Use the Infrared (IR) Remote

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ม.ค. 2022
  • Let's see how to add an Infrared remote to your Arduino projects. This lesson helps you to get started with this simple and awesome IR technology.
    ●ESP32 IR Control: • ESP32 IR Receiver: Con...
    ● Playlist Link: bit.ly/2VT2ZAN
    ● Arduino IDE: www.arduino.cc/en/software
    Best Arduino Starter Kit 👇
    ✅ amzn.to/3TUro3o
    --------------------------------------------------------------------
    ► Get Your First Arduino Starter Kit 👇:
    👉 amzn.to/3VfGNM1
    👉 amzn.to/3L7gPpw
    --------------------------------------------------------------------
    ✅ My current Productivity Setup 👇:
    ● Gaming Headset: amzn.to/3HyXgp2
    ● Gaming Mouse: amzn.to/3ni4Ygp
    ● Best Webcam: amzn.to/44pVUqw
    ● Keyboard: amzn.to/3ALXB3M
    ● GPU: amzn.to/42mylNt
    ● CPU: amzn.to/44lOBjs
    --------------------------------------------------------------------
    FOLLOW ME:
    ● Github Projects: github.com/Enjoy-Mechatronics
    ♥ Never Click This! bit.ly/3jvI8g6
    ● Facebook: / enjoymechatronics
    --------------------------------------------------------------------
    ► All content by Enjoy Mechatronics is 100% free. I believe that education should be freely available to everyone.
  • วิทยาศาสตร์และเทคโนโลยี

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

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

    Thank you so much. It's quite something when I spend hours trying to figure out how to set up my own IR Remote, but nothing works. Then I came across your video, followed exactly what you did, and it ended up working! Once again, thank you!!!!

  • @yasinkotere6578
    @yasinkotere6578 ปีที่แล้ว +4

    I kiss your heart, brother.
    I have been trying to set up this damn remote for about two hours and no complicated approach or solution from the Internet seemed help, except for your coherent, simple, and logical code.
    May your problems go away like mine.

  • @AllanWallsPhotography
    @AllanWallsPhotography 5 หลายเดือนก่อน +5

    Another excellent video presentation. You manage to include every project detail and give the information clearly and succinctly, without a wasted word. Great job!

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

    Your video help me to make it work, thank you. the fact that you also mentionned the library version really help. I guess many people has trouble with it because there is incompatibility between the code suggest and the library version currently install on their system

  • @michalb.3562
    @michalb.3562 ปีที่แล้ว +2

    Thank you for your tutorials. Your arduino tutorials are very useful and I like the fact that you mention exactly which library to use, because they can get confusing.

  • @india_venom209
    @india_venom209 6 หลายเดือนก่อน +1

    Thank you so much mate .I have watched lot of videos nothing had worked for me. You saved my life dude, I have a project on this.

  • @SNAEDLAND
    @SNAEDLAND ปีที่แล้ว +3

    Thanks man. I was really stuck on this lesson for the IR remote. I think I got it nailed down now.

  • @Ham7000
    @Ham7000 3 หลายเดือนก่อน

    OMG FINALLY IVE BEEN LOOKING EVERYWHERE FOR A VIDEO THAT WORKS AND THIS IS THE ONLY ONE IVE FOUND THANK YOU

  • @user-xg4sl2jb7b
    @user-xg4sl2jb7b 8 หลายเดือนก่อน +4

    you are the best 👍
    i search many tutorials , no one works
    finally , i watch this
    this really works
    just look at the way you code this can tell that you totally know these

  • @Tanlee29
    @Tanlee29 4 หลายเดือนก่อน

    Thanks you, I spent many time to set up this system but it didn't work but today i find this video despite simple code but it work very well, again thanks you very much!

  • @jsn7123
    @jsn7123 3 หลายเดือนก่อน +1

    Straight to the point, very well done!

  • @yari3061
    @yari3061 ปีที่แล้ว +1

    THANK YOU SO MUCH. i have a lot of problems decodifing my ir control with other methods

  • @123masteryoda123
    @123masteryoda123 ปีที่แล้ว

    Your code worked great. I've adapted it to work with a SG90 servo. I need it to move 10 points in one direction or 10 points in the other depending on what key on the remote I press. The only problem I'm having is when I hook up the servo, I get a ton of interference with the IR and it can't read the remote. Even when the servo is sitting idle, I can see numbers all over the serial monitor, and the IR flashing. When the servo is unhooked, it works great (or at least the serial monitor says it does).

    • @EnjoyMechatronics
      @EnjoyMechatronics  ปีที่แล้ว +1

      Most probably this is a power problem, Supply the servos from power source different from the Arduino power source and make sure it has sufficient current rating.
      Or use the 5 volt Pin to power the servo
      And the 3.3 volt Pin to power the ir receiver because servos make some noise to the power source and that affects the ir receiver.

    • @stukkiedrol9719
      @stukkiedrol9719 ปีที่แล้ว +1

      @@EnjoyMechatronics You have no idea how much this comment helped me! Thank you so much!!

    • @EnjoyMechatronics
      @EnjoyMechatronics  ปีที่แล้ว +1

      @@stukkiedrol9719 No worries

  • @Imrooot
    @Imrooot 11 หลายเดือนก่อน +1

    Worked for me, thank you!

  • @yt440volts
    @yt440volts ปีที่แล้ว +1

    Very nice, HELPED me a lot thanks

    • @EnjoyMechatronics
      @EnjoyMechatronics  ปีที่แล้ว +1

      I’m so glad to hear that. Thank you so much.

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

    Finally i found the Code for HW477 that works. Many examples use the old code that doenst work properly with hw477 and give random output. Thank you very much.

  • @devyanshgarg6156
    @devyanshgarg6156 3 หลายเดือนก่อน +1

    Very well explained sir. Clear, simple and concise code. Thank you

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

    Just a word "The BEST".

  • @johnvandenberg2445
    @johnvandenberg2445 9 หลายเดือนก่อน +1

    Excellent and thank you for this great video

  • @scorpionesc9999
    @scorpionesc9999 4 หลายเดือนก่อน +1

    first to say , your video is really cool, most simple and clear, congratulation for that. i enjoy to read out the codes from the remote, but unfortunally i cant find your libary today. my IDE is 2.0.2 and thre is no matching libary you use. used HW is same. do you have an idea to get your good libary into mine IDE?

  • @bimapgri2227
    @bimapgri2227 11 หลายเดือนก่อน +1

    Your tutorial is very helpful thank you

  • @fatosyigit7582
    @fatosyigit7582 2 หลายเดือนก่อน +1

    Çok teşekkür ederim.işime çok yaradı

  • @justanothererd01
    @justanothererd01 ปีที่แล้ว +1

    Cool tutorial! One question, what is the name of the song from your intro? It's BANGIN!!!!

  • @oficinarscarservice
    @oficinarscarservice 9 หลายเดือนก่อน +3

    Fantástico!! Ganhou um seguidor!!!
    Estava com dificuldade em fazer isto funcionar com outros sketchs, qualquer tecla pressionada sempre retornava 0FFFFFFF (delay configurado era de 100 ms, será isso?).
    Seu método foi o único que funcionou.
    Muito obrigado.

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

    In your serial monitor, make sure to set it to 9600 baud at the bottom otherwise you might end up with something odd showing up

  • @ListVerse-vv7bt
    @ListVerse-vv7bt 7 หลายเดือนก่อน +1

    Are there any mini remotes like that in which you can program the IR codes?

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

    really good video thank you

  • @eduf8443
    @eduf8443 8 หลายเดือนก่อน +1

    God bless you man, Thanks.

  • @user-zk8xi1vg6w
    @user-zk8xi1vg6w ปีที่แล้ว

    great video. Really helpful

  • @NurvnUWU
    @NurvnUWU 5 หลายเดือนก่อน +1

    thank chu :3
    and chur voice sounds cute ^W^

  • @akramelkhalifi8165
    @akramelkhalifi8165 ปีที่แล้ว +1

    very interesting, ty !

  • @vijaysulakhe5605
    @vijaysulakhe5605 2 หลายเดือนก่อน +1

    Excellent...many thanks.

  • @FunnyToker
    @FunnyToker 8 หลายเดือนก่อน +1

    I tried it. super. thanks for the video

  • @stevielut8596
    @stevielut8596 2 หลายเดือนก่อน +1

    I want to ask you , can you tell me where you get that like code like that "decode "IR " , I mean where , I have been. searching it , please reply , thanks

  • @Bianchi77
    @Bianchi77 ปีที่แล้ว +1

    Nice video, thanks :)

  • @ShrekBigscary
    @ShrekBigscary 11 หลายเดือนก่อน +1

    thanks man your a legend

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

    Thankkkkkkks, your vidéo is very very Good 😇😇😇😇😇😇😇😇😇😇😇😇😇

  • @bimapgri2227
    @bimapgri2227 11 หลายเดือนก่อน +1

    Tutorial anda sangat membantu terikasih

  • @IlyesCodes
    @IlyesCodes ปีที่แล้ว +1

    dude u r the best

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

    just in case it's a good tutorial video.

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

    If i want to apply it at real lights with high voltage electric power can i directly connect them or should i use a relay for that?

  • @kimkeoelectrical
    @kimkeoelectrical หลายเดือนก่อน

    Thank you for share good video I like this video.

  • @magmagth4346
    @magmagth4346 ปีที่แล้ว +1

    Many thanks 🌹🙏

  • @SEEMAKUMARI-qf3qk
    @SEEMAKUMARI-qf3qk ปีที่แล้ว +1

    Yes I also agree

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

    Extreeeeeme videeeeeo

  • @aaronswank
    @aaronswank ปีที่แล้ว +1

    Im not getting a HEX code in the serial monitor, just a simple two digit number. any help?

  • @Slndr_Salam
    @Slndr_Salam 6 หลายเดือนก่อน +1

    thanks broooo

  • @kumaraswamy2817
    @kumaraswamy2817 4 หลายเดือนก่อน +1

    Good idea,

  • @meddiys6171
    @meddiys6171 8 หลายเดือนก่อน +1

    Excellent.

  • @IlyesCodes
    @IlyesCodes ปีที่แล้ว +1

    im subscribing RN

  • @GuilhermeMendes246
    @GuilhermeMendes246 ปีที่แล้ว +1

    how can i get the pattern or Pronto Hex Code?

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

    can you pleas copy the codes i need it why you do that the Ir reciver senser flame up😥

  • @Genezis-88
    @Genezis-88 9 หลายเดือนก่อน +1

    Pls create an RF 433mHz version 🙏🏻

  • @kudakwashemudzingwa8660
    @kudakwashemudzingwa8660 10 หลายเดือนก่อน +2

    Hie thanks for the straight forward tutorial but am having a problem with the HEX of each remote button, when l press the same button l get a different HEX number , what could be the problem???

    • @weizhu716
      @weizhu716 9 หลายเดือนก่อน +1

      check your library , install the newest one

    • @welcometochiles6156
      @welcometochiles6156 8 หลายเดือนก่อน

      Could be the library like weizhu said, but I have another theory since I'm on the latest and have the same problem unless I blast the remote right into the receiver: I think any interference with the receiver messes with how the receiver decodes the remote, thus different results.

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

    Can someone help me with my project? My plan is to control servo with IR remote control do rotate it and to control DC to speed it up or slow it down to use it like a fan.

  • @Elytraz17
    @Elytraz17 4 หลายเดือนก่อน +1

    I've been trying to find some code that will work, i've finally found it
    tysm

  • @minhkhoanguyen1407
    @minhkhoanguyen1407 8 หลายเดือนก่อน +3

    can i borrow your code please

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

    Is there a distance away from the arduino that I should limit placement of the transmitter to? I want to place an IR transmitter near the dome light in my car to control aspects of my DSP, but I think the distance would exceed 9 feet from the Arduino to where the LED will go. Didn't know if the signal would be strong enough to go that far. Great job on the video, very easy to follow.

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

      Thanks, man
      I think the maximum distance is about 10 meters.

  • @prasadweerasingha7335
    @prasadweerasingha7335 ปีที่แล้ว +1

    First thanks for sharing your knowledge. When I'm doing this, I faced some issue. I'm also have the same as your remote. (Same size same brand). But every key returns same value like FFFFFFFF. What could be the issue bro? 🤔

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

      You may need to update the library
      Or check out my new video th-cam.com/video/cO1zmqijjkA/w-d-xo.html

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

      @@EnjoyMechatronics Library version is 4.1.1 and that is the latest.

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

      Hello, did you find the solution ? I have the same problem too(((((((((

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

      U know, it just worked for me by chance i think, i deleted my latest library 4.1.2 and installed 3.5.2 and rebooted Aduino several times))) it is working , i don't know what to say more))

  • @abishek_raja_01
    @abishek_raja_01 7 หลายเดือนก่อน +1

    I have one doubt. Is IR sensor and IR reciever is same or different?

    • @EnjoyMechatronics
      @EnjoyMechatronics  7 หลายเดือนก่อน +1

      Yeah, there is a difference
      IR sensor is a broad term that encompasses sensors capable of both emitting and receiving IR radiation, while an IR receiver is a specialized sensor designed to receive and decode IR signals, commonly used in remote control applications.

  • @jafararif931
    @jafararif931 ปีที่แล้ว +1

    Hello, thank you so much for the video but the code doesn't seem to work, I'm not very good at arduino and I'm doing it for a project

    • @EnjoyMechatronics
      @EnjoyMechatronics  ปีที่แล้ว +1

      You could check out this new video
      th-cam.com/video/cO1zmqijjkA/w-d-xo.html

  • @Anchannel944
    @Anchannel944 2 หลายเดือนก่อน +1

    HI, Thanks for the vid. I've tried 3 different remotes and recvers, but every time I get FFFFFFFF, and I don't know why. Please help. Thanks.

    • @TacoAlligator
      @TacoAlligator หลายเดือนก่อน

      Make sure your monitor is set to 9600 baud otherwise it might show up weird

  • @lambda.plays.game_
    @lambda.plays.game_ 4 หลายเดือนก่อน +1

    where are double sided jumper wire

  • @diaxx9999
    @diaxx9999 6 หลายเดือนก่อน +3

    here is the code for lazy ones : #include
    IRrecv IR(3);
    int ledPin = 8;
    void setup( ) {
    // put your setup code here, to run once:
    IR.enableIRIn( );
    pinMode(ledPin, OUTPUT);
    Serial.begin(9600);
    }
    void loop() {
    // put your main code here, to run repeatedly:
    if(IR.decode( ) ){
    Serial.println(IR.decodedIRData.decodedRawData, HEX);
    if(IR.decodedIRData.decodedRawData == 0xEA15FF00){
    digitalWrite(ledPin, HIGH);
    }
    if(IR.decodedIRData.decodedRawData == 0xF807FF00){
    digitalWrite(ledPin, LOW);
    }
    delay(1500);
    IR.resume( );
    }
    }

  • @hungtranvan6298
    @hungtranvan6298 7 หลายเดือนก่อน +1

    Hi everybody.
    I'm currently having a problem and need your help:
    When receiving the remote's external signal, the VS1838B module only displays 0xFFFFFFFF
    How to fix it?
    Thank you
    Sorry that my English is quite bad

    • @joehighpockets
      @joehighpockets 7 หลายเดือนก่อน

      When I use the cheap remote I also get 0xFFFFFFFF but when I use a XFINITY TV remote I get different codes.

  • @anushaanu5185
    @anushaanu5185 หลายเดือนก่อน

    I have written your code and wired everything correctly but this is not working for me

  • @AgentEmerald0028
    @AgentEmerald0028 11 หลายเดือนก่อน +2

    can you add a file of this code so that we don't need to copy literally everything you've done?

  • @E-4-elecTronic
    @E-4-elecTronic 10 หลายเดือนก่อน

    I am getting same code for all buttons

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

    help me pls my serial monitor doesn't show anything

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

      Select the same baud rate 9600 from the serial monitor

    • @Guus8666
      @Guus8666 ปีที่แล้ว +1

      @@EnjoyMechatronics I have that but it doesn’t work, maybe the receiver burned out?

  • @kolyaayrapetyan7048
    @kolyaayrapetyan7048 9 หลายเดือนก่อน +5

    Does not work. Very disturbing delay And without it it doesn't work. Please tell me what can be done

    • @ElectrostatiCrow
      @ElectrostatiCrow 4 หลายเดือนก่อน

      Try reducing the delay. To 1000 or less than that.

    • @ElectrostatiCrow
      @ElectrostatiCrow 4 หลายเดือนก่อน

      Wait. Try increasing the delay. Whichever works best.

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

    I need your urgent help
    If i press button of remote led should glow for 10 seconds and within these 10 seconds if we press again the same button led should be still glowing for again 10 sec this loop should continue until no button is pressed
    Please tell me how can I do?

    • @EnjoyMechatronics
      @EnjoyMechatronics  ปีที่แล้ว +1

      Use millis() command.
      Sorry, I haven't created a video about it yet.

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

    why nothing in serial monitor

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

      Select the same baud rate 9600

    • @Guus8666
      @Guus8666 ปีที่แล้ว +1

      @@EnjoyMechatronics I have that but It doesn't work

  • @user-cu3sx4pm1n
    @user-cu3sx4pm1n 7 หลายเดือนก่อน +2

    it's great but it didn't work for me

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

    Hello

  • @prakashharash8380
    @prakashharash8380 ปีที่แล้ว +1

    HI !

  • @daankruger1233
    @daankruger1233 ปีที่แล้ว +1

    Can Someone please give me the code it wont work for me i think i did something wrong:(

    • @shakhobiddinnakiev6767
      @shakhobiddinnakiev6767 ปีที่แล้ว +1

      U know, it just worked for me by chance i think, i deleted my latest library 4.1.2 and installed 3.5.2 and rebooted Aduino several times))) it is working , i don't know what to say more))

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

      I changed the code a little too, I forgot to tell))

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

      @@shakhobiddinnakiev6767 Can you send the code so I can copy and paste it please?

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

      @@nathanfenoseff7751 #include
      IRrecv IR(9);
      decode.results result;
      void setup() {
      // put your setup code here, to run once:
      IR.enableIRIn();
      Serial.begin(9600);
      }
      void loop() {
      // put your main code here, to run repeatedly:
      if (IR.decode()){
      Serial.println(results.value, HEX);
      delay(1500);
      IR.resume();
      }
      }

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

      @@shakhobiddinnakiev6767 ty

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

    I only received ffffffffff from all buttons please help 😢
    R change ir sensor multiple time but same . I also change my arduino but i always get fffffffff code .. anyone please help

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

      Hello, bro, i have also the same problem !!!!(((((( didn't u find the solution??

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

      U know, it just worked for me by chance i think, i deleted my latest library 4.1.2 and installed 3.5.2 and rebooted Aduino several times))) it is working , i don't know what to say more))

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

    fake

  • @ernestorodriguez4742
    @ernestorodriguez4742 6 หลายเดือนก่อน +2

    Very good. This method works. It did not work with other method always giving FFFFFF. This code worked for me with version 3.5.2
    #include
    IRrecv IR(3);
    void setup() {
    // put your setup code here, to run once:
    IR.enableIRIn(); // Cambiado de enableIRIN a enableIRIn
    Serial.begin(9600);
    }
    void loop() {
    // put your main code here, to run repeatedly:
    if (IR.decode()) { // Cambiado de If a if
    Serial.println(IR.decodedIRData.decodedRawData, HEX); // Cambiado de IT.decodeIRData a IR.decodedIRData
    delay(300);
    IR.resume();
    }
    }

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

    hello that code doesn't work, we throw it out that it has a problem with: IR.enableIRIn (); what should I do?

  • @spinningcube128
    @spinningcube128 8 หลายเดือนก่อน +2

    CODE:
    #include
    IRrecv IR(2);
    int led = 8;
    void setup() {
    // put your setup code here, to run once:
    IR.enableIRIn();
    pinMode(led, OUTPUT);
    Serial.begin(9600);
    }
    void loop() {
    // put your main code here, to run repeatedly:
    if(IR.decode()){
    Serial.println(IR.decodedIRData.decodedRawData, HEX);
    if (IR.decodedIRData.decodedRawData == 0xE916FF00){
    digitalWrite(led, HIGH);
    if (IR.decodedIRData.decodedRawData == 0xE619FF00){
    digitalWrite(led, LOW);
    }
    delay(1500);
    IR.resume();
    }
    }
    }

  • @TodoInventosTV
    @TodoInventosTV ปีที่แล้ว +1

    Buenoa
    Buenaso #todoinventostv
    Realy good

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

    zuc.k

  • @minskie
    @minskie หลายเดือนก่อน

    I have written your code and wired everything correctly but this not working for me