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

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

Paul McWhorter

4 года назад

111,033 Просмотров

Ссылки и html тэги не поддерживаются


Комментарии:

Hafeez
Hafeez - 23.09.2023 10:04

Mine is saying error compiling for Arduino Uno board

Ответить
Ged Toon
Ged Toon - 31.08.2023 17:47

You don't need to use a pwm pin to receive data, any free pin will do. If you want to transmit IR data, you must use pin 3.

Ответить
Emmanuel Saie
Emmanuel Saie - 27.08.2023 07:53

I get a different combination of "HEX" code every time I press zero on the IR remote. Therefore I can't code the command with associated button press. Please help if you have similar problem.

Ответить
normanrick
normanrick - 26.08.2023 19:26

I'm feeling quite disheartened to share that my Arduino journey has come to an unexpected halt, even though I was just a few videos away from completing it. Unfortunately, I made a mistake with my infrared receiver module. I assumed that despite its physical differences, it might share the same pin placement as the one in the video. Regrettably, that wasn't the case. I accidentally connected the voltage pin to ground, the ground pin to the data pin, and the data pin to the Vcc pin. After about five minutes, I noticed an unusual smell coming from the IR receiver. I tried to disconnect it immediately, but I ended up burning my fingers in the process. Now, the IR receiver isn't functioning anymore. It's a disappointing turn of events, to say the least.
To make things a bit more challenging, I can't find a replacement for this component in my city, so I'll have to wait for days until it's delivered from another country. It's a bit frustrating, but I'm trying to stay patient and hopeful for when I can continue my experiments. And also i want to thank to you for all these valuable informations. You are truly the best.

Ответить
Isaac Moon
Isaac Moon - 21.08.2023 19:45

i am legend!

Ответить
Christian Norman
Christian Norman - 07.08.2023 01:29

I am legend!

Ответить
Joseph Traverso
Joseph Traverso - 28.07.2023 17:51

Thank you!

Ответить
Kingsley Tart
Kingsley Tart - 22.07.2023 00:32

Great tutorial Paul, thank you so much.

My first Arduino was delivered today and my first program was to print out IR codes on the serial monitor when I pointed remote controls at it and pressed buttons.

I tried it with a few IR remotes we have in the house. Some results were great, some were confusing.

A Sony controller always transmitted the same code for any given button.

A Roku controller registered nothing - perhaps it's on a different frequency.

Two Panasonic controllers I tried (different Panasonic products) were strange. Pressing the same button multiple times transmitted different codes for most repeated presses of the same button, though some codes were repeated.

Another controller (for a Humax PVR) always seemed to transmit 0xFFFFFFFF regardless of which button was actually pressed, which clearly can't really be the case because the PVR knows which button is actually pressed.

I guess there's a lot more to these IR controllers than I originally hoped.

Ответить
Robert Erady
Robert Erady - 21.07.2023 23:41

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

Ответить
Lefteris Dagkalakis
Lefteris Dagkalakis - 21.07.2023 15:59

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

Ответить
Geo Dra
Geo Dra - 18.07.2023 00:51

great tutorial. SI enjoyed watching and following it. If you could it would also be great to have a similar tutorial for the later versions of IRremote library. For this tutorial, you have to se te earlier versions eg v2.8.

Ответить
Hector Peralta
Hector Peralta - 27.06.2023 05:18

I am Legend - Mister Paul was not able get it to work with your code had to use IR.decodedIRData.decodedRawData

Ответить
Cook It Up
Cook It Up - 25.06.2023 04:58

Just a heads up with the newer version of this library the IR.decode does NOT work. I got the message: "warning: 'bool IRrecv::decode(decode_results*)' is deprecated: Please use IrReceiver.decode() without a parameter and IrReceiver.decodedIRData.<fieldname> . [-Wdeprecated-declarations]
while(IR.decode(&cmd)==0) { }" So I used: "while(IrReceiver.decode()==0) { }" and it compiled.
I use library version 4.1.2

Ответить
Larry Cash
Larry Cash - 24.06.2023 03:59

Hi Paul, I am not one to complain, usually, however, the Elegoo kit is not really a great kit as I have had several components not usable. The electric motor would not spin at lower speeds, I needed 255 to get it to run, going any lower and it pooped out. Then the IR reciever used in T64 just does not work, and I do have it hooked up correctly, I have been wiring electronics all my life, so I am sure its the reciever. I have a few on order so I can continue with your tutorial. Just saying, i may have gotten the lemon kit, heh. I am enjoying your tutorials non the less. Thank You!

Ответить
Awais Asghar
Awais Asghar - 18.06.2023 18:03

Paul can we use PIR or passive infrared in this project.

Ответить
SB24
SB24 - 14.06.2023 01:34

I'm just getting FFFFFFFF for all buttons

Ответить
SB24
SB24 - 14.06.2023 00:06

Could you not just have installed it using library manager? Thank you though

Ответить
Sourish Thakral
Sourish Thakral - 31.05.2023 19:49

please tell me how does ir.resume function works

Ответить
John Ellick
John Ellick - 31.05.2023 00:36

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 😊

Ответить
Adiraj Chalotra
Adiraj Chalotra - 26.05.2023 23:47

Hi Paul, I written down you code and downloaded it on my nano and I keep getting FFFFFFFF? I looked at my code and there’s nothing out of the ordinary and looked at other people’s code and it still hasn’t worked?

Ответить
Doug R
Doug R - 24.05.2023 01:48

I am Legend. I finished the homework with an updated library.

Ответить
Raz M
Raz M - 17.05.2023 20:48

Hi, great lessons!
What could be the problem that I get the same value every time I press a button?
I get the value FFFFFFF

Ответить
Huh What
Huh What - 17.05.2023 00:07

When I go to the serial monitor, it only spits out "FFFFFFFF", I've tried 3 different remotes all in the scope of the developers. I've tried different versions of the IRremote. I've tried different ports on the arduino, and different wires. I've double checked my code. I'm at a loss.

Ответить
Ram Muga
Ram Muga - 11.05.2023 16:24

Paul the Guru. Thank you very much. I had some problem with the values with the version 4.1.2, I have to use 2.2.3. Thanks for the pointers in the comments below. Also noticed the values change depending the distance of the remote control. Did anyone observe it?

Ответить
Ean Carris
Ean Carris - 09.05.2023 21:03

I am legend

Ответить
Ean Carris
Ean Carris - 09.05.2023 20:24

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!

Ответить
Artūrs Rikmanis
Artūrs Rikmanis - 05.05.2023 19:08

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

Ответить
Guy Van den Brouck
Guy Van den Brouck - 05.05.2023 15:46

Hello. Can some one help me out here. I keep getting the same result when I push any button : FFFFFFFF

Ответить
Aaron Milliman
Aaron Milliman - 05.05.2023 02:53

Hahahaaa,, I'll figure this one out. I'm now running Ubuntu and not windows. My RC car isn't responding accordingly. I have downloaded the library, am connected to the car, upgraded Arduino and still getting nothing for feed back. Thoughts?

Ответить
Wayne Andrews
Wayne Andrews - 03.05.2023 02:56

I am legend!
All 21 keys mapped. The latest IRremote library printed the same value for every button.
Version 3.9.0 worked fine.

Ответить
Gary Graham
Gary Graham - 17.04.2023 20:35

I am legend

Ответить
Jason Victor
Jason Victor - 01.04.2023 19:58

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"!!!

Ответить
Cappelaere Dominique
Cappelaere Dominique - 23.03.2023 05:50

Great thing as usual. But when I press any buttons the result in the monitor is: FFFFFFFF.
Why that and not the code

Ответить
Kevin Adesso
Kevin Adesso - 15.03.2023 17:22

I AM LEGEND homework DONE!!!!!!

Ответить
John Jacob JinglehimerSchmidt
John Jacob JinglehimerSchmidt - 14.02.2023 02:04

I know in home automation that people want to do the wifi or zigbe or what have you but to me. I have just tons of IR remotes laying around.
How hard would it be to put IR readers in each room and send them to a central location and then use an arduino to trigger relay switches.

If you can discern between remote a/b/c/d/e ....... xx then you can give each member their own remote they can decide the functions that their remote executes. Take your remote to the kitchen turn on a light get your snack. Turn the light off and turn on the bath room light .... turn it off turn on hall light and go to room turn off hall light turn off bedroom light.

Ответить
Ben Mayer
Ben Mayer - 12.02.2023 05:47

I am legend.

Ответить
HoldNoBars
HoldNoBars - 12.02.2023 04:03

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

Ответить
Johnnie Blansett
Johnnie Blansett - 27.01.2023 09:04

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!

Ответить
DOVE RIVER MEDIA
DOVE RIVER MEDIA - 23.01.2023 19:50

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.

Ответить
Steve
Steve - 22.01.2023 13:58

I am legend. Thank you so much Paul. YOU ARE LEGEND!

Ответить
Matthew Collins
Matthew Collins - 17.01.2023 15:29

Present. I am Legend. Still struggled with the new format and had to go around to find out how to get it to work but I got it.

Ответить
Muhammad Rafiqul Islam Khan
Muhammad Rafiqul Islam Khan - 09.01.2023 07:54

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.

Ответить
David Buckley
David Buckley - 07.01.2023 09:42

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

Ответить
Kirubel Tekle
Kirubel Tekle - 26.12.2022 14:48

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

Ответить
Arseny Ivanov
Arseny Ivanov - 13.12.2022 02:17

Here is an interesting one for you all. I was following this lesson today and everything was working, just the decoded commands were inconsistent. It took me an hour and a half to figure out that my table lamp was emitting some IR, which in turn was interfering with sensor's readings. The lamp has multiple light modes (natural light, white, light yellow, yellow, warm yellow). I can pick up two out of five with the IR sensor. How cool is this?

Ответить
Ryan Somerville
Ryan Somerville - 12.12.2022 02:56

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!

Ответить
Randonm
Randonm - 03.12.2022 03:00

Anytime I go to see on the serial monitor it just shows question marks and x’s and I don’t understand why because I have the code properly written out

Ответить
Israel Kolawole
Israel Kolawole - 02.12.2022 17:42

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

Ответить