Arduino Controlled using TV or IR Remote
ฝัง
- เผยแพร่เมื่อ 25 ม.ค. 2017
- In this tutorial we will learn how to control our LEDs with using TV or IR remote. After this tutorial, you can control everything with your TV or IR remote.
Required Hardware
Arduino Board:
goo.gl/Rqc5w2
amzn.to/2LZr6t4
IR Receiver Module Kit:
goo.gl/PwBgFm
amzn.to/2PEW6QP
IR Sensor Only Receiver :
goo.gl/hWqnJ7
amzn.to/2PLnLQ8
LED:
goo.gl/CPAXXf
amzn.to/3qxSs8O
220ohm Resistor :
goo.gl/FVgEyR
amzn.to/3jXMJXs
Breadboard :
goo.gl/GjpqVW
amzn.to/3qxLxwm
CR2025 Coin Battery :
goo.gl/ot2BJz
amzn.to/3u7Gp3y
Jumper Wires:
amzn.to/3doetmT
Recommended Items:
Use Your Muscles in Project - amzn.to/3wdL45C
37 Sensor & Module Packages - amzn.to/3m66WeQ
Try this Robot Arm - amzn.to/3fq8DCl
Best Resin 3D Printer - amzn.to/39tY8KB
Arduino Compatible Kits - bit.ly/2J2AFF7
Banggood Spring Sale - bit.ly/3slMbOn
About IR :
Infrared (IR) controls are often used in most electronic devices.
This LED will give a predefined code when we press any key on the remote control and a certain frequency will also flash.
The 38 kHz infrared receiver we use in the project demodulates the signal it receives and sends the button code to the Arduino. We can use with this receiver as long as different brand and model remote controls have 38 kHz carrier signal.The receiver has 3 pins. These are GND - VCC - Signal respectively.
About Hex code :
First we must find the hex codes of the buttons of remote controller.
This way you can use another remote control instead of the included in the kit. So if you have only receiver, you can use any TV remote control. We will use the IRrecvDump example code.
Download IR library: goo.gl/INTfWC
Uncompress the ZIP or RAR file onto your desktop
Place the folder into your arduinosketchfolder/libraries folder
Rename the uncompressed folder IRremote
Download Source Code: create.arduino.cc/editor/mert...
Social Media:
/ mertarduino
/ mertarduino - วิทยาศาสตร์และเทคโนโลยี
Source Code: create.arduino.cc/editor/mertarduinotech/9d107596-a93d-4406-835e-ecf8d63f189b/preview
Recommended Items:
Use Your Muscles in Project - amzn.to/3wdL45C
37 Sensor & Module Packages - amzn.to/3m66WeQ
Try this Robot Arm - amzn.to/3fq8DCl
Best Resin 3D Printer - amzn.to/39tY8KB
Arduino Compatible Kits - bit.ly/2J2AFF7
Banggood Spring Sale - bit.ly/3slMbOn
Didn't realize that there were already such good sketches that came with the library. Thank u!
Finally an ir tutorial, keep up the amazing videos ☺️
Lol... I’m newbie, making my own ir project right not and i have exactly the same tv remote. So it was unexpected for me that tv remote can have two codes on the same button. I was scratching my head before you’re video showed up. Thank you so much, mate
WHAT THE HELL , THIS VIDEO IS HELP ME !! THANK YOU !!
*i feel so very happy because hardly find that way*
best video for irRemote finally you solved my problem Thank you so much
nice and clear practical video. Thank you.
Thank u Sir !
it's working and u helped me a lot Thank u again.
man i love you you saved me thx
Thanks Mert Arduino, it works :))))))))
Thank you so much.
GREAT..... I have a question, what if I want to light the LEDs for a duration of time?
I don't understand, I found the hex values, but I'd get an error saying that the hex value wasn't declared or something like that. So I removed the hex conversion in the ir example (just commented out /*, HEX*/ from Serial.println(results.value, HEX); ) and received an 8 or 9 digit number, I took that number and defined it in my new sketch as the corresponding button numbers and just like that the code complied and it lit up the leds. Why couldn't I just use the hex value as shown in the video?
that looks great
Thanks for your nice video, could you help me how to simulate log key press(lets say I have to press and hold a key for 5 seconds )
Can I have your background music name, feeling relaxed... Also love your project, keep up the good work.
Thank you so much.
What do you think is it not quite well if to use analogWrite(pin, 100) for LEDs (instead of (digitalWrite(pin, HIGH)).
Then we have not to use resistors and configure pins as OUTPUTs.
thank you.
even thought if to use 100 power level instead of 255 full power level?
is not it (100) equal to 2v?
thaaank youuu very much
nice work.keep going on ;)
it is an awesome project
Thanks
Great video....
can i get some idea how to make it stm 32?? can you send some links for that??
Thank you very much man I was struggling very much but thanks to your video it works thanks man!
Mert Arduino and Tech Any time!! ;)
i want this kind of videos good
cok yardimci oldu desekkurler
Did you try to run this project with external power Supply. Not with laptop or pc usb power. 5 v dc power Supply.
Merhaba, KEYES marka aynı kumanda ve receiver kit ile denemeler yaptığımda aynı tuş için farklı farklı kod üretildiğini gördüm, tutuş yönüne göre rasgele farklı kodlar da okunabiliyor. Aynı testi evdeki başka IR uzaktan kumandalar ile denediğimde sonuçlar daha tutarlı, bir tuş için hep aynı kod geliyor. Bunun hakkında fikriniz var mı acaba? Teşekkürler videolar için.
please make an video on ir flame sensor
Nicely.
where do you get the serial monitor pls help me SOS
i dont understand 2nd remote code setup, please explain it, how to use single button for on and off led. please
Solved, thank you...It's working well! Nice project
how did you fixed it?
Hannah Adornado You have To DOWNLOAD the sketch,Not open or copy-past The sketch
*library not sketch,sorry
When I try to upload the program to my board it keeps telling me 'unable to find numeric literal operator 'operator""FBF807' could somebody help me out please?
love it
What's the range?as normal ir remote?
pls provide a circuit diagram for feature vedios
very nice : )
Plss upload Circuit diagram for this......
I get the same error as all the other tutorials "exponent has no digits" someone help! not sure what i'm doing wrong.
Sir what will be the arduino code for connecting two ir remote sensor with single arduino
My aurdino problem is
No Protocoal: Aurdino uno r3
What is the code, if it is pressed on and when it is released off
I'm down load the remote libraryin library and also in emample file. This program is open .but I can't execute it.
The error message is
IRremote.h: No such file or direcrtory
its soooooooooo coooooooool
can you please help me My aurdino board is not running correctly
I am getting different values for same button
code is not acessible at the website shown
Can you create a video of controlling leds using esp8266??
Along with Android app
Farklı kumandalardan da alabiliyormuyuz sinyali elinize sağlık güzel olmuş 😂
Mert Arduino Tutorial & Projects teşekür ederim detaylı açıklamanız için 😂
It works! It works! The dislike button works! No, just kidding. The project works great. Thanks so much. Also, the like button worked.
Can you please send me the program please I need to do project
It's working.
Bt after a single button press.
I need to reset the arduino.
Otherwise next press didn't working.
I don't uploading any data in Uno constant mismatch error plz help me
How did you make your IDE background dark
There is a "Dark Arduino IDE" app you can download.
😍😍😍
I need same help please i have try my best for hours and only get error!
Class decode_results has no member named"address".
Can any remote control
okk make a complete robot with lcd , ping , temprature , and bluetooth
nice job, just explain a bit more the code next time
can you make a robot with ir sensor
❤️❤️❤️❤️ cool 😎
Mert Arduino Tutorial & Projects You deserve it❤️❤️❤️&you are welcome ❤️
Is it possible to use mobile applications instead of remote??
yes
How is it that you use the code of the second control to set them with the same button? I do not get it :(
same question
The code that was used in the second control, the LED turn on with the same button to turn off.
led tak to thik he. jab me isko relay board se koi high voltage ac light connect karta ho tab remote thik se kam nehi karta. 2-3bar press karne se ekbar kam karta he
I cannot access the code document
didnt work, someone helps me? i have the galileo board and when i compile the program appear an error called "no such file or directory" someone knowns why?
have you installed the library
and my arduino board will not connecting to laptop plese help me
sir the code can't upload
why do I buy a remote control for my project
I Faild i think it is the code
you also make a car
i cant upload the scetch
why??
me too someone answer us
@@yt_show7967 late reply, but did you download the library?
The code doesn't work :(
It did not work with me and I do every single steps the same :(
me try kiya work ho raha he. lekin problem ek he. jab me relay se 220 line se bulb connected karta ho tab remote ka switch 3-4 bar press karnese ekbar on/off ho raha he
Please add
Dont works with arduino nano
error:
Class decode_results has no member named"address". Please help me
Mert Arduino Tutorial & Projects //------------------------------------------------------------------------------
// Include the IRremote library header
//
#include
//------------------------------------------------------------------------------
// Tell IRremote which Arduino pin is connected to the IR Receiver (TSOP4838)
//
int recvPin = 11;
IRrecv irrecv(recvPin);
//+=============================================================================
// Configure the Arduino
//
void setup ( )
{
Serial.begin(9600); // Status message will be sent to PC at 9600 baud
irrecv.enableIRIn(); // Start the receiver
}
//+=============================================================================
// Display IR code
//
void ircode (decode_results *results)
{
// Panasonic has an Address
if (results->decode_type == PANASONIC) {
Serial.print(results->address, HEX);
Serial.print(":");
}
// Print Code
Serial.print(results->value, HEX);
}
//+=============================================================================
// Display encoding type
//
void encoding (decode_results *results)
{
switch (results->decode_type) {
default:
case UNKNOWN: Serial.print("UNKNOWN"); break ;
case NEC: Serial.print("NEC"); break ;
case SONY: Serial.print("SONY"); break ;
case RC5: Serial.print("RC5"); break ;
case RC6: Serial.print("RC6"); break ;
case DISH: Serial.print("DISH"); break ;
case SHARP: Serial.print("SHARP"); break ;
case JVC: Serial.print("JVC"); break ;
case SANYO: Serial.print("SANYO"); break ;
case MITSUBISHI: Serial.print("MITSUBISHI"); break ;
case SAMSUNG: Serial.print("SAMSUNG"); break ;
case LG: Serial.print("LG"); break ;
case WHYNTER: Serial.print("WHYNTER"); break ;
case AIWA_RC_T501: Serial.print("AIWA_RC_T501"); break ;
case PANASONIC: Serial.print("PANASONIC"); break ;
case DENON: Serial.print("Denon"); break ;
}
}
//+=============================================================================
// Dump out the decode_results structure.
//
void dumpInfo (decode_results *results)
{
// Check if the buffer overflowed
if (results->overflow) {
Serial.println("IR code too long. Edit IRremoteInt.h and increase RAWBUF");
return;
}
// Show Encoding standard
Serial.print("Encoding : ");
encoding(results);
Serial.println("");
// Show Code & length
Serial.print("Code : ");
ircode(results);
Serial.print(" (");
Serial.print(results->bits, DEC);
Serial.println(" bits)");
}
//+=============================================================================
// Dump out the decode_results structure.
//
void dumpRaw (decode_results *results)
{
// Print Raw data
Serial.print("Timing[");
Serial.print(results->rawlen-1, DEC);
Serial.println("]: ");
for (int i = 1; i < results->rawlen; i++) {
unsigned long x = results->rawbuf[i] * USECPERTICK;
if (!(i & 1)) { // even
Serial.print("-");
if (x < 1000) Serial.print(" ") ;
if (x < 100) Serial.print(" ") ;
Serial.print(x, DEC);
} else { // odd
Serial.print(" ");
Serial.print("+");
if (x < 1000) Serial.print(" ") ;
if (x < 100) Serial.print(" ") ;
Serial.print(x, DEC);
if (i < results->rawlen-1) Serial.print(", "); //',' not needed for last one
}
if (!(i % 8)) Serial.println("");
}
Serial.println(""); // Newline
}
//+=============================================================================
// Dump out the decode_results structure.
//
void dumpCode (decode_results *results)
{
// Start declaration
Serial.print("unsigned int "); // variable type
Serial.print("rawData["); // array name
Serial.print(results->rawlen - 1, DEC); // array size
Serial.print("] = {"); // Start declaration
// Dump data
for (int i = 1; i < results->rawlen; i++) {
Serial.print(results->rawbuf[i] * USECPERTICK, DEC);
if ( i < results->rawlen-1 ) Serial.print(","); // ',' not needed on last one
if (!(i & 1)) Serial.print(" ");
}
// End declaration
Serial.print("};"); //
// Comment
Serial.print(" // ");
encoding(results);
Serial.print(" ");
ircode(results);
// Newline
Serial.println("");
// Now dump "known" codes
if (results->decode_type != UNKNOWN) {
// Some protocols have an address
if (results->decode_type == PANASONIC) {
Serial.print("unsigned int addr = 0x");
Serial.print(results->address, HEX); THIS LINE MAKES PROBLEMS. CAN YOU HELP ME PLEASE?
THANK YOU :)))
Serial.println(";");
}
// All protocols have data
Serial.print("unsigned int data = 0x");
Serial.print(results->value, HEX);
Serial.println(";");
}
}
//+=============================================================================
// The repeating section of the code
//
void loop ( )
{
decode_results results; // Somewhere to store the results
if (irrecv.decode(&results)) { // Grab an IR code
dumpInfo(&results); // Output the results
dumpRaw(&results); // Output the results in RAW format
dumpCode(&results); // Output the results as source code
Serial.println(""); // Blank line between entries
irrecv.resume(); // Prepare for the next value
}
}
i also get the same error as Francesco Savoja
Serial.print(results->address, HEX);
help please i have try my best for hours!
IRsendDemo won't compile #25 >Search Github issues.
Ibrahim Osman You have to download the library,not copy-paste. Than you will find that in "examples"
same problem here!!! SOS!!!
Do you have any music other than that? thats just getting annoying