Arduino Tutorial 64: Understanding and Using the Infrared (IR) Remote to Control a Project

Поделиться
HTML-код
  • Опубликовано: 14 июл 2024
  • You guys can help me out over at Patreon, and that will help me keep my gear updated, and help me keep this quality content coming:
    / paulmcwhorter
    In this tutorial we show you had to add an Infrared (IR) remote to your arduino project. This lesson gets you stated, and then we will add features in the next lesson.
    You can get the kit I am using for this series at the following link:
    amzn.to/2I7N4Ek
    I strongly suggest picking up an arduino nano, since it can plug directly into the breadboard, making a portable system more practical. You can pick one up here:
    amzn.to/2WXTC2M
    As projects get more complicated in these lessons, you guys really need to get a set of breadboard jumper wires which allow you to make neater connections on the board in your projects. You can pick a pack of these wires up here:
    amzn.to/2XrY5Kq
    In addition as projects get more complicated, you are going to need a bigger breadboard. This is a reasonable one here:
    amzn.to/2IY4d3M
    You can find more resources on our WEB site:
    toptechboy.com/arduino-tutori...
    [Disclosure of Material Connection: I am a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to amazon.com. This means if you visit the link and purchase the item, I will receive an affiliate commission. Regardless, I only recommend products or services I use personally and believe will add value to my readers.]
    #Arduino
  • НаукаНаука

Комментарии • 561

  • @eancarris3850
    @eancarris3850 Год назад +16

    I was getting FFFFFFFF for every reading. Checked my very short, very simple code 1000 times and even burned up my IR receiver by wiring it backwards while troubleshooting. I finally discovered that the IRRemote library version I was using (4.1.2) has a problem. I reverted back to IRRemote v3.5.2, stole an IR receiver from an old heater, and I'm back in business!

    • @shokdj1
      @shokdj1 4 месяца назад

      I'm glad you said that

  • @libbytardalo2071
    @libbytardalo2071 3 года назад +23

    I have a fix for those of you getting nothing but zeros!! It's the library!
    I pulled my hair out for hours, then went back to where Paul downloaded his OLDER version (2.2.3). I deleted the newer version, installed 2.2.3 and everything worked properly!!

    • @laxmanrao4554
      @laxmanrao4554 3 года назад

      Thanks it worked!

    • @jonathangross4870
      @jonathangross4870 3 года назад

      Thank you for saving me a lot of time.

    • @rileyparker678
      @rileyparker678 3 года назад

      You are a hero

    • @geraldinecommowick
      @geraldinecommowick 3 года назад +1

      Thanks for that. I was getting a message to use "decode()" but couldn't make it work.

    • @tobinsexton6246
      @tobinsexton6246 3 года назад

      I struggled with this too! I found that I had to use quotation marks around the library name rather than the

  • @JustinS06
    @JustinS06 2 года назад +18

    For everyone who got a strange error regarding a "deprecated" function, try switching the IR library to an earlier version (for example, 2.8.0)!
    Great video by the way Paul!

    • @iseecrap
      @iseecrap Год назад

      thanks for this Justin, my project just wouldn't work!

    • @thapaharis
      @thapaharis Год назад +1

      thanks. didn't read your comment earlier. After figuring out it for myself, read your comment.

    • @mehdibmc9508
      @mehdibmc9508 8 месяцев назад +1

      yoo man thank you so much I kept getting ffffff and I thought maybe the hardwrae was faulty

    • @jacobpilegaard9196
      @jacobpilegaard9196 6 месяцев назад

      Great tip - thanks a lot :)

  • @laurakav1202
    @laurakav1202 3 года назад +20

    Paul -- I am so grateful to you for making all these great lessons. The IR sensor is really fun. I listen to every single one of your videos all the way through. You are LEGEND!! P.S. Agree that gas station coffee is not as good as homemade. For students - the library has been changed since this video was made. You have to download the older library that Paul uses.

  • @opalprestonshirley1700
    @opalprestonshirley1700 4 года назад +4

    This is going to be a great series. I've been working OLED displays and PIR sensors and this should work well with this IR pad. Have a great week.

  • @HeatherJordanJewelry
    @HeatherJordanJewelry 4 года назад

    I am legend! You really are a gifted teacher. I haven't been bored at all and your enthusiasm for the subject is contagious!

  • @nithinsai2250
    @nithinsai2250 3 года назад +26

    Only a few number of people are watching your videos :(
    Remember one thing grandpa,u are sharing a lot of knowledge to us, and we are very grateful :)

  • @rondeacon2556
    @rondeacon2556 2 года назад +1

    Thank you for not editing out your mistakes. I learn a lot by just watching them pop up and you figuring out what they are and correcting them.

  • @hertzmaddentv8304
    @hertzmaddentv8304 3 года назад +9

    The amount of knowledge you’ve been sharing with us is impeccable!

  • @vinsensiusreinard2859
    @vinsensiusreinard2859 4 года назад +1

    Thank you so much for making a refreshed tutorial I've learned many Arduino from you and I've been in countless electronics competitions thanks to your knowledge. also I got an offer to teach at my high school which became my first job. I wish for you to have THE BEST DAY for giving this information for free. I really don't know what or, where I am now if I didn't watch your Arduino tutorials 3 years ago. this really means a lot to me. I can't stop thanking you :D.

  • @adamcurtice3584
    @adamcurtice3584 2 года назад

    I am legend. I have completed the homework as assigned. Thank you once again for the great lesson. My knowledge and experience with the Arduino just keeps growing. Thanks for all that you do Paul. You are one of the greats.

  • @hughpatterson1480
    @hughpatterson1480 2 года назад +6

    Happy Holidays Paul! Another great lesson to pass on to my students. This is a great tutorial because it deals with a real life application, our television remote control. Students tend to show greater interest in lessons that explain real life technology they interact with every day. Also, adding a remote to your project takes things to an entirely new level. Thanks again and Marry Christmas. I have found that electronics is a nice shelter from the craziness of the world. I may not be able to solve the world's problems but I can solve my project problems!

    • @hughpatterson1480
      @hughpatterson1480 2 года назад

      I forgot to say "I am legend" (with a small "l" due to a lot of extra work due to error messages in order to make it work properly)

  • @anthonyskilton8634
    @anthonyskilton8634 3 года назад

    We are grateful Paul, thank you. I've jumped a few lessons but now need to find your hexadecimal tutorial.

  • @simr6493
    @simr6493 4 года назад +5

    I was literally wondering if this was possible yesterday!
    I am only on lesson 20, but I look forward to this one!!

  • @artursrikmanis
    @artursrikmanis Год назад

    We are still watching. Lovely videos, thank you, Paul. Newbies will appreciate your detailed method of tutoring more after watching other videos that don't explain anything as neat as you do

  • @kirubeltekle9553
    @kirubeltekle9553 Год назад +1

    I did my homework and I have come all the way through lesson number one; Paul, your lessons are pretty darling. Long live Paul!.... fan from Ethiopia

  • @snehashishbanerjee2575
    @snehashishbanerjee2575 4 года назад +3

    It's good to see ya after a long time. Wonderful tutorial. Wanna see more interesting projects like this! God bless you for doing such an amazing work, for the students from all over the world..!

  • @nwsmoat2674
    @nwsmoat2674 3 года назад +2

    Hooked a brother up with these tutorials. You're an amazing teacher. Thanks Paul :)

  • @axelbergmann4040
    @axelbergmann4040 4 года назад +1

    Hi Paul, as always, great lesson, thank you. I did the homework by using the switch..case command, made it very easy.

  • @stephenmarshall1286
    @stephenmarshall1286 4 года назад +5

    Paul, I posted a review on Amazon regarding the Arduino mega 2560 and in the comments I mentioned your lessons, hopefully this will get more subscribers.

  • @cryptikkcries
    @cryptikkcries 3 года назад

    thank you! i'm doing a project for school making a box that opens using a remote control. it's my second or third arduino and your tutorials are really helpful!

  • @davidbuckley4912
    @davidbuckley4912 Год назад +9

    I am legend. I was able to finish this homework. Also, the IRreceiver library has been updated since you did this lesson, and the code you provided threw an error message saying that the code might give unreliable results. I was able to track down the changes and modify the code as required, and got it working without asking others for assistance. Thank you Paul for your lessons and your encouragement. In the past when I have tried to learn programming I would have given up long before this. You are also a legend! Thank you

    • @gairikdhar5175
      @gairikdhar5175 Год назад +4

      can you please upload the code of receiving th ir signals

    • @shakhobiddinnakiev6767
      @shakhobiddinnakiev6767 Год назад

      @@gairikdhar5175 #include
      const byte IR_RECEIVE_PIN = 10;
      void setup()
      {
      Serial.begin(115200);
      Serial.println("IR Receive test");
      IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);
      }
      void loop()
      {
      if (IrReceiver.decode())
      {
      Serial.println(IrReceiver.decodedIRData.command, HEX);
      delay(500);
      IrReceiver.resume();
      }
      }
      //upload IRremote.h to 4.1.2, the accuracy is waaay better !))

  • @MrOregonteacher
    @MrOregonteacher Год назад

    I'm just getting started on adding my Arduino remote to a sound sensor circuit. I'm creating a box to control some lights that will flash with music, but also go into other sequences when called up by the remote. I'll keep you posted! Thanks for all your had work on this!

  • @mikekeller7342
    @mikekeller7342 4 года назад

    Great lesson. Glad you were getting the same intermittent glitchy results and not just me.

  • @liamm729
    @liamm729 3 года назад

    You most likely saved me regarding a college assignment I have haha. So far got 100% on everything, your videos playing their part in that. Arduino and Microcontrollers are definitely things I enjoy, will for sure invest time into personal projects and things.

  • @rc45satx
    @rc45satx 3 года назад

    I am legend. This is the first time I've been able to actually do all the homework before the next session. Life is good.

  • @robertnelson1802
    @robertnelson1802 3 года назад

    Did the homework, been frustrated as not been able to get my PMcW fix due to nonsense distractions. Back now and loving it even more.

  • @deathmetallica2nd
    @deathmetallica2nd 4 года назад

    I am legend....Thank you Paul for making so many legends and creating this legendaryyyy series

  • @panzerblitz8226
    @panzerblitz8226 2 года назад

    Thanks Paul! Always great trainings. did the HW " I am legend" I am so glad that you teach. You have a great gift.

  • @larrysmart4755
    @larrysmart4755 4 года назад

    Love your videos. thank you!
    I have several of these remotes and IR modules but have done nothing with them yet.
    I think I'll start building some things now.

  • @israeltola9627
    @israeltola9627 3 года назад

    I AM LEGEND .So far your the best teacher i have come across that makes Arduino projects easy👌👌

  • @bigbear333uk1
    @bigbear333uk1 4 года назад

    That was a really nice lesson Paul and looks like it will have some good uses

  • @aynursunagatullin7029
    @aynursunagatullin7029 3 года назад

    Thank you Mr.McWhorter, you explain so easily!

  • @larrygold144
    @larrygold144 3 года назад

    Hi Paul, "I Am Legend". You have spoken about the power of Arduinos. Well, this tutorial has given me a glimpse into the world of possibilities I now have at my finger tips to control the magic of IR. I am so excited to get started on my homework! Thank you so much for your knowledge of IR and the beautiful way you share it.
    Your disastrous episode with your "gas station" coffee, reminded me of a marquee along side a southwest Texas highway in front of a truck stop several years ago. The marquee was too small to hold all the words the sign was intended to convey to the passing truckers.. The last line of the marque read " DIESEL FRIED CHICKEN". Paul, that scrumptious chicken would have gone well your "gas station" coffee.

  • @calebsuit5390
    @calebsuit5390 6 месяцев назад

    I love your videos man. I’m working on an IR project now and this is clutch. Thank you!

  • @jimlabissonniere7400
    @jimlabissonniere7400 3 года назад

    Thanks again Paul....Amazing possibilities with IR technology....Had some issues downloading the library but ..I AM LEGEND!

  • @justinjones8744
    @justinjones8744 2 года назад

    Great videos the best ive seen i am trying to do some projects for my car and your tutorials are helping me learn Arduino and develop my projects thanks.

  • @lefterisdagkalakis3016
    @lefterisdagkalakis3016 11 месяцев назад

    Paul, you are a true legend. Words cant describe how much these tutorials have helped me make whatever I want. THANK YOUUUUUUU!!!!!!!!!

  • @skmplanet9591
    @skmplanet9591 2 года назад

    This is amazing. It opens up new vistas for all. You are the superstar.

  • @bertmouthaan
    @bertmouthaan 3 года назад

    It's getting more interesting every time ... and I am a legend, but still humble ... unfortunately I see these lovely series comming to an end ...

  • @CarolinaDGF
    @CarolinaDGF 2 года назад

    Another great lesson, Paul. I did the homework without going to the next lesson. Instead of using a bunch of if statements, I used a switch statement. The default case prints, "I didn't get that...." if it does not understand a button press.

  • @RobQtech
    @RobQtech 11 месяцев назад +2

    hi Paul for some reason my readings on the serial monitor are just FFFFFF not sure if it's my remote or the irrecv, but overall I have truly been educated on this channel, lots of gratitude for your lessons in this Arduino series

    • @ouicmoijim3549
      @ouicmoijim3549 6 месяцев назад

      I have the same problem! Did you found the solution?

    • @user-md3qr6lt6e
      @user-md3qr6lt6e 5 месяцев назад

      @@ouicmoijim3549 Change to an older library, 02.8 will work with Paul's commands. FYI, I had the same problem when I first rand Paul's program. Good Luck!!

  • @legendarycraft5499
    @legendarycraft5499 4 года назад

    I did the homework in a nice way (using functions and creating lists of elements in order to compare them and avoid writing many "if" statements). :)
    Thank you very much for the amazing tutorials. I followed them from the first one and with them it was much better and easier to get into Arduino (Computer Science Student). Once I finish my exams, I will start to watch the other tutorials that you have because I am sure that they are amazing. :D
    Again, thank you very much for doing these videos.

  • @jasonvictor9542
    @jasonvictor9542 Год назад

    Wow, finally got it working, libraries are updated and commands also updated, but i did what you taught us to debug one thing at a time. Thank you Paul you are still "LEGEND"!!!

    • @anishpinto1
      @anishpinto1 9 месяцев назад

      Did you get it to work by using the updated library commands? Or did you downgrade your library and use the commands that Paul used in the video?

  • @SSchumacherCO
    @SSchumacherCO 3 года назад

    This lesson could not have come at a better time. The day after I completed it, I was able to debug a problem with the remote to my treadmill.

  • @karelenmarritkruyswijk393
    @karelenmarritkruyswijk393 4 года назад +1

    it's simple after you explain. thank you very much!

  • @glennfelpel9785
    @glennfelpel9785 4 года назад

    Super project...Love it. Just what I was waiting for....Thank You

  • @marcomoriarty7692
    @marcomoriarty7692 3 года назад

    I don't even watch any other arduino videos anymore. The risk/reward benefit just doesn't compare to this man's consistency.

  • @doverivermedia3937
    @doverivermedia3937 Год назад +1

    LEGEND ! oooh loving this one. mapped it out a treat. Cut & paste from the serial monitor was a handy method ... I noticed my spare TV controllers created a HEX signal too. Very interesting. Most excellent video as always. Thank you.

  • @PedroLuis-yp9ed
    @PedroLuis-yp9ed 3 года назад

    I am legend. Completed the homework. Excited on what we're going to do with this.

  • @Rtech98
    @Rtech98 4 года назад

    I am legend. Glad I finally caught up with all the videos.

  • @RavensHammer00
    @RavensHammer00 3 месяца назад

    Okay! I am Legend, having used a backdated library, everything is working great, now, on to the next lesson!!! Thanks, Paul!

  • @rayboutin6642
    @rayboutin6642 4 года назад

    Keep up the great work. Very inspirational!

  • @coasterbp
    @coasterbp 2 года назад

    I'm LEGEND! I cleaned it up a little by saving the Serial.println until AFTER all the if statements. Saves a bit of typing and keeps the size down a bit. Thanks for the lessons, Paul!

  • @rickbonari4493
    @rickbonari4493 4 года назад

    Hello Paul,
    Great arduino tutorial and looking forward to your robotics series !!!!!

  • @56Victorine
    @56Victorine 2 года назад

    Thank you Paul great lesson!

  • @narasimharaomotupalli8599
    @narasimharaomotupalli8599 4 года назад

    I am Legend. Thanks Sir.. Whenever I complete an assignment, I feel so elated that I got a feeling that I can control anything :)... I know that still lot to learn for me and do. I am very Happy.. Thanks Sir!...

  • @hillarymapondera4122
    @hillarymapondera4122 2 года назад

    I am Legend all 17 commands are now fully operational. Thank your Mr Paul 🤓

  • @marianocapone8576
    @marianocapone8576 Год назад

    Greetings Paul, I always enjoy your lessons.
    Ciao

  • @suramyadidwania623
    @suramyadidwania623 2 года назад

    I am legend, I did the homework without you describing it as just an experiment and a small setup sort of thing with intentions to make my commands and functions easier and faster with this sensor. Thanks a lot and I really like your videos. 😄

  • @drbirdleaf2574
    @drbirdleaf2574 9 месяцев назад

    With the amount of time that has passed since this lessons upload and now, there have been many changes to libraries and things. I spent three frustrating days on this and somewhat have it working but most of the commands from the library are very different.
    As frustrating as it was, it helped me learn a lot, both through practice as well as all the reading and research I did while figuring it out.

    • @jazibi786
      @jazibi786 6 месяцев назад

      Post the code plzz

  • @dukanvasnygg
    @dukanvasnygg 4 года назад +6

    Loved This series so much!! Thank you so much for everything so far... Would it be possible for you to do a RFID reader tutorial at some point ??

    • @TheParksy72
      @TheParksy72 3 года назад

      id love an RFID Reader tutorial :D

  • @phillovegrove4704
    @phillovegrove4704 4 года назад +4

    I am legend, not bad for a 69 year old. Too cold in N.Z for iced coffee, as below zero here, red wine works.
    Great series Paul.

  • @vihashah5975
    @vihashah5975 4 года назад

    Mr Paul McWhorter You are a GOD!!!! Thank you so much now I can resume working on my arduino robot car project because I was stuck on this for a very loooong time!!!! also instead of an if statement you guys should use the switch case statement and it s easier and faster.

  • @horamflyers3839
    @horamflyers3839 4 года назад

    Hello Paul. Yes I did the homework using a for loop for every button.
    I expect you have a neater way. Just seen your preview on the robot car.
    Looks interesting. Have a kit on order. Thanks for all the lessons.

  • @vincecouldrey2370
    @vincecouldrey2370 3 года назад

    I am legend, I had a few issues getting this code to work with the latest library version. Had to downgrade to an earlier version to work.
    Another great video Paul.

  • @martinlewis645
    @martinlewis645 2 года назад

    Hi Paul. I came back to this lesson and several others to help my son with a project. It is great to see all the new comments and all the interesting feedback. Thanks again!

  • @picklefish71
    @picklefish71 2 года назад +1

    This lesson almost had me giving up on learning to program Arduinos. I uploaded the program and every time I pressed the remote button it gave me a different number...completely different and never repeated. Also, it was a 7 digit number instead of a 5 digit like you got. Then I read about the library version issue. I converted from 2.X to 3.X, thanks to someone's excellent comment below. Same exact result. Then I went back to version 2.8.1 as someone else suggested. Same exact result. Then I went back to 2.2.3 like you used. Same exact result. I checked, rechecked, re-recheck, re-re-rechecked and re-re-re-re-re-rechecked my code. It was exactly the same as yours. Hours trying to research on the internet did not help. Finally, it just happened that a new IR sensor just came in the mail. I had ordered it for a project I'm going to build once I learn Arduino programming a little better. Out of curiosity, I plugged the new one into my circuit and BOOM! it started working perfectly. Each button on the remote is now giving a single, discrete 5-digit number. I can only assume the Elegoo IR sensor was not working properly. Now I need to work on regrowing all the hair I pulled out trying to figure this out.

    • @MrBartallica
      @MrBartallica 2 года назад +1

      Thanks, I also have this issue. Always getting different results when pressing the same button. Which IR sensor did you get?

  • @johnellick7778
    @johnellick7778 Год назад

    My Elegoo remote only showed F's decoded. I ended up using a Github updated code. Sounds strange but it worked with a Sharp TV remote. The rest of Paul's projects worked out great. He is a great instructor 😊

  • @haneen3731
    @haneen3731 2 года назад

    Awesome tutorial!

  • @jasoncliffe1959
    @jasoncliffe1959 4 года назад

    very good series watching all video and learnt a lot

  • @richardalexander633
    @richardalexander633 2 года назад +2

    I am legend. One of the things that this lesson taught me was the value of looking at the community comments and support below. I too couldn't get the library that the tutorial uses 2.2.3 to work with the commands, as Paul had given them, but you guys helped, and I was able to use the latest IRremote library 3.6.1. and the code changes suggested by you out there in the community kind enough to share. You guys are so cool - all help greatly appreciated Thank you. I'm sure Paul would appreciate the support network being so robust too.
    Fun to play with the remote control.

  • @prashantgunjal5566
    @prashantgunjal5566 4 года назад

    cool i was looking for this only thing till now until i found a well explained video thanks(actually i have been watching every video and they were all great

  • @theteenengineer7589
    @theteenengineer7589 4 года назад +1

    I just made a project like this yesterday!! Nice video, was wondering when you would do it 👍👍👍I am Legend

  • @yepitsmebob88
    @yepitsmebob88 2 года назад

    I am legend and so are you. Great work you're doing here, keep it up.

  • @PauloLopesdosSantos
    @PauloLopesdosSantos 2 года назад +5

    I used the Release 3.3 of the IR Remote library, which is not compatible with release 2.2.3 used in the lesson. After some research, I found that the following changes have to be made:
    1- It is not necessary to define the IRrecv and the decode_results objects (IR and cmd in the lesson);
    2 - In the setup() function, the
    IR.enableIRIn()
    command is replaced with the
    IrReceiver.begin(IRpin,ENABLE_LED_FEEDBACK)
    or the
    IrReceiver.begin(IRpin,DISABLE_LED_FEEDBACK)
    depending on if you want a LED feedback from the Arduino board.
    3 - In the loop function the condition
    IR.decode(&cmd)==0
    in the waiting cycle is replaced by
    IrReceiver.decode()==0
    4 - The contents of
    cmd.value
    is in
    IrReceiver.decodedIRData.decodedRawData.
    Hence, the command
    Serial.print(cmd.value,HEX)
    must be replaced with
    Serial.print(IrReceiver.decodedIRData.decodedRawData,HEX)
    5 - The codes of the buttons are different. In the new release, the bits are reversed.
    Each code has 4 bytes. The 4 least significant bytes are the same for all buttons. They are all equal to 0xFF00. Since the codes of release 2.2.3 are bit reversed, their 2 most significant bytes are 0 and the codes seem to have 3 bytes.
    After these changes, I could replicate the lesson and do the homework. In the homework, I have removed the 4 LSB because they are the same for all buttons. I also reversed the code bits to compare with the ones of the lesson.
    Finally, the IR receiver is not totally responsive. Sometimes it misses a code or gives the wrong one.

    • @ellerycadel
      @ellerycadel Год назад

      you are a lifesaver, thank you!! Agreed, I keep getting bad codes as well. The series has been great until now so I think to keep my sanity I will stop here and move on to python!!!

    • @gundoggydog
      @gundoggydog Год назад

      THANKS4THIS!!

    • @fablapp
      @fablapp Год назад

      yes noticed the same, quite a mess but it is very easy to revert to a previous version from the library manager for the sake of the tutorial. And very poor response and erratic, sometimes better then other times, important to tune the delay... found 500 works better.

  • @niceguy5772
    @niceguy5772 3 года назад

    you are real change maker to the world , look how old are you but despite your age look what you do ,great job uncle

  • @muhammadrafiqulislamkhan6994
    @muhammadrafiqulislamkhan6994 Год назад +1

    I need to watch this video over and over again fully understand what is happing here. I must say again, you are the greatest legend in Arduino Teacher for me. My request to you that you make another new session about Arduino projects. I guess your 68 videos are primary level projects and programming. We need a little advance level after finishing your 68 classes. Where we go then? I would say, you make another 32 classes about Arduino advanced level projects the basis of your 68 videos. Then your 100 videos will complete us a Arduino programmar.

  • @pointer333
    @pointer333 2 года назад +1

    Man, this was a journey, but I AM LEGEND! Using the very latest library. Was up til 3am last night and couldn't get any meaningful prints. At a complete loss today, I removed everything from the breadboard, put it all back, and rewired it. Like nothing was ever wrong, it worked! Stole code from various sources since I couldn't find a very concise official documentation... Probably didn't look hard enough.... But after tinkering for a while, seeing what was really needed, and what wasn't, I have a code structure that looks exactly like Teach's, but uses updated commands and gets rid of unnecessary and deprecated lines.
    Although Teach probably doesn't like us giving away answers, due to the number of folks who have, with recent library versions, had loads of trouble, below is the very simplest version I could make work as expected. There have been a few versions posted in these comments (big thank you to you folks!). Only giving away what's needed to set up the receiver and get a serial mon print. IRRemote library version 3.7.1 (July 2022).
    NOTE: Oddly, I am only able to read 2 digit hex values from this remote and receiver combo... If anyone can explain that, I would love to know! The code below works for me, though!
    #include
    int IRpin = 9;
    int cmd;
    int dt=250;
    void setup() {
    Serial.begin(9600);
    IrReceiver.begin(IRpin);
    }
    void loop() {
    while (! IrReceiver.decode()) {
    }
    cmd=IrReceiver.decodedIRData.command;
    Serial.println("HEX: " + String(cmd, HEX));
    delay(dt);
    IrReceiver.resume();
    OTHER NOTE:
    I tried using IrReceiver.decodedIRData.decodedRawData to store in our "cmd" variable, but every remote button would read the same value. It was a lot longer than the 2 digits I was getting, though which was almost interesting...

  • @bhushansurve3503
    @bhushansurve3503 5 месяцев назад

    i was a victim of software update, so, none of the code shown here worked with updated IR library.. Had to figure out how the new code worked. I did not have a remote or IR receiver.. bought the IR receiver from amazon.. stole an old tv remote and got going.. happy that i was able to do that and stay with the lesson.. (i had to drop the Humidity and temp lesson because of the same SW update issue i think..) i will go back and figure out a way to make that work too.. But, yes Paul, you made me think... Thank you for all your efforts. I see that I am 3 years late, and you are onto new video lessons.. eager to join you there.. after i get to the end of this series.. till then adios...

  • @klrwhizkid
    @klrwhizkid 4 года назад +1

    After the Stranahan's, I got a little wild and decided to play around. I dug out the LCD Display and calculator code from Lesson 48 and made an IR remote calculator with an LCD display.

  • @israelkolawole7144
    @israelkolawole7144 Год назад

    I am a Legend, I also included LEDs to turn it on and off with the remote, Thank you so much Mr. Paul for this great tutorial

  • @petergawthorne4660
    @petergawthorne4660 4 года назад +1

    Hi Paul, I am legend! looking forward to seeing where this project goes next.

  • @sagaradissanayake
    @sagaradissanayake 3 года назад

    I am legend!
    Thank very much for the all the knowledge you are giving us. God bless you Sir.

  • @Hino_55
    @Hino_55 4 года назад

    I like putting the IR.resume() command at the very first line inside the void loop()
    I think of it as a command that is used to start the detection-and-decoding of IR signals by the IR sensor.
    and I'd like to think of the IR.decode(&cmd) as the command that instructs the sensor if the cmd variable already
    contains an IR signal.
    Great great lesson Sir Paul.
    Thank you for this!

    • @Hino_55
      @Hino_55 4 года назад

      P.S. I am Legend

  • @blansettj
    @blansettj Год назад +2

    I've been with you since lesson 1. I really appreciate the way you go in depth to help us learn so much more than just what we need to do, but why we're doing it. I always do my homework, I usually throw in a few extra challenges for myself when your lessons inspire me to do so.
    I never have commented since the videos are a few years old, but now that I see how many people are still actively involved I wish I'd been commenting all along.
    I loved seeing that you also have a site involving Bible studies. I haven't checked it out yet, but I plan to at some point. I'm actually working on a book, slowly, that will hopefully help inspire people to read The Bible for themselves. The book, if I ever finish it, will address several widely taught topics that scripture teaches very differently from the mainstream views. I believe that too many teachers just repeat the scriptures that have been ascribed to the same views they've supported their whole lives. Instead we should be searching out the scriptures for ourselves to find out what God is teaching us and adjust our beliefs accordingly. Just like Arduino and other electronic devices can seem beyond the average person's understanding until they jump in and spend some time with them. God's word can feel out of reach for many, but nothing is more worthy of our time and effort than finding out the truth about why we exist, and what awaits us once we find the truth and live our lives according to those findings.
    I, like many others, would love to see you continue this series with many of the other peripherals included in The Most Complete Starter Kit. I have the set that includes the Mega 2560, but I believe the Complete Uno kit has all of the same attachments. We're ALL holding our breath waiting to see if you upload more lessons for our Arduinos while we wait for the price of the Raspberry Pi to come back down to earth, SCHHHHHHHH... Boom!

    • @paulmcwhorter
      @paulmcwhorter  Год назад

      Excellent. Check out the Bible videos . . . sounds like we have a similar perspective on things.

  • @lakmithanadun1853
    @lakmithanadun1853 2 года назад

    Thank you Paul. You're a great teacher.

  • @richardmensah781
    @richardmensah781 5 часов назад

    Thanks a lot for your lessons. Very easy to understand steps and terms even if you are a beginner in text coding.

  • @aaronmilliman7685
    @aaronmilliman7685 Год назад

    You make this too easy, I thank you for that!

  • @wallaceshackleton1889
    @wallaceshackleton1889 4 года назад

    I am legend.
    Well that was interesting a bit laborious but I guess telling us were we could include a library wouldn't be so much fun.
    Roll on the next lesson!

  • @amt12
    @amt12 3 года назад

    I am legend. This is the best way to go thru the Covid-19 lock down.

  • @MSMEHYDRO
    @MSMEHYDRO 4 года назад

    I am legend! Also figured out that if my phone is near the sensor, it will spit out random numbers! Hope all is well Paul!

  • @mohsenr4434
    @mohsenr4434 2 года назад

    What a good lesson, thank you.

  • @romycruz4498
    @romycruz4498 3 года назад

    Hi Sir, watching from the Phils. Thanks for your tutorials. :)

  • @jesswill2353
    @jesswill2353 3 года назад

    You're doing awesome!

  • @2006death2006
    @2006death2006 4 года назад

    100% like me with all the tabs open and hope there's no more gas station coffee another great video always helpful and useful

  • @nevilled
    @nevilled Год назад

    I AM LEGEND!!! Great video Mr. McWhorter!!!

  • @eladioh3858
    @eladioh3858 3 года назад

    I am legend !!!!
    Amazing lesson
    Thank You Paul

  • @ricklawitzky8311
    @ricklawitzky8311 2 года назад

    Good explanation and idea!

  • @wire7
    @wire7 4 года назад

    Great! keep it up Paul.