Comments on: Arduino – Control LEDs with IR Remote Control https://randomnerdtutorials.com/arduino-ir-remote-control/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Tue, 17 Dec 2024 19:22:31 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Sahan https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-699011 Tue, 16 Nov 2021 17:04:59 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-699011 My IR reciever blew off when i gave 5v from the board.Plz change the value to 3.3v if not someone less will also face the trouble too.

]]>
By: Sara Santos https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-675734 Thu, 30 Sep 2021 16:16:12 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-675734 In reply to Pasan.

Hi.
All the code is posted in the tutorial.
Regards,
Sara

]]>
By: Pasan https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-675687 Thu, 30 Sep 2021 14:07:23 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-675687 Hello can you give me the c programming code for this IR remote controlled LED system

]]>
By: Alan Knight https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-569006 Wed, 10 Mar 2021 17:50:59 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-569006 In reply to Alan Knight.

Hi Sara,

I followed your instructions to download the ‘Ir Remote’ library.

When I got the result shown above I did some research. Went onto Arduino forum & found a solution.

Then I modified your code as shown below. The decoded values for numbers 1 – 6 are 0 -5.

This I used in the switch statement.

The code now works perfectly.

But why:

(1) Did the original code not work on my system.

(2) Why do I now get single digit codes?

Keep up your great work.

Stay safe

Alan

/*
* Modified by Rui Santos, http://randomnerdtutorialscom
* based on IRremote Library – Ken Shirriff
*/

#include <IRremote.h>

const byte IR_RECEIVE_PIN = 11;
int IrReceiverValue;
int bluePin = 10;
int greenPin = 9;
int yellowPin = 8;

void setup(){
Serial.begin(9600); //starts serial communication
IrReceiver.begin(IR_RECEIVE_PIN, ENABLE_LED_FEEDBACK);

pinMode(bluePin, OUTPUT); // sets the digital pin as output
pinMode(greenPin, OUTPUT); // sets the digital pin as output
pinMode(yellowPin, OUTPUT); // sets the digital pin as output
}

void loop(){
//decodes the infrared input
if (IrReceiver.decode()){
IrReceiverValue = IrReceiver.decodedIRData.command, HEX;

//switch case to use the selected remote control button
switch (IrReceiverValue){
case 0: //when you press the 1 button
digitalWrite(bluePin, HIGH);
break;
case 1: //when you press the 4 button
digitalWrite(bluePin, LOW);
break;
case 2: //when you press the 2 button
digitalWrite(greenPin, HIGH);
break;
case 3: //when you press the 5 button
digitalWrite(greenPin, LOW);
break;
case 4: //when you press the 3 button
digitalWrite(yellowPin, HIGH);
break;
case 5: //when you press the 6 button
digitalWrite(yellowPin, LOW);
break;
}
IrReceiver.resume(); // Receives the next value from the button you press

}
delay(10);
}

]]>
By: Alan Knight https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-563636 Sat, 27 Feb 2021 17:52:55 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-563636 Sara,

All I get when running the sketch in this tutorial is:

The function decode(&results)) is deprecated and may not work as expected! Just use decode() – without any parameter.
The function decode(&results)) is deprecated and may not work as expected! Just use decode() – without any parameter.
The function decode(&results)) is deprecated and may not work as expected! Just use decode() – without any parameter.
The function decode(&results)) is deprecated and may not work as expected! Just use decode() – without any parameter.

checked wiring, OK.
used decode(): monitor completely blank.

Please help.

Alan

]]>
By: Bob https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-529915 Wed, 16 Dec 2020 14:53:34 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-529915 Do you have any tutorials like this for the esp8266?

Thanks

Bob

]]>
By: Sara Santos https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-527435 Thu, 10 Dec 2020 10:21:16 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-527435 In reply to Manish Dobhal.

Great!

]]>
By: Manish Dobhal https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-526921 Wed, 09 Dec 2020 01:28:43 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-526921 I followed exactly what you did and controlled the LED using my arduino board first time. it is so simple. Thank you so much. Keep helping us.

]]>
By: Karanbir https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-361706 Fri, 12 Apr 2019 10:27:34 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-361706 I followed this tutorial, there were compile errors referred to the file IRremote.cpp. I did the corrections and there were no errors. I checked with NEC, panasonic and another (Sky). How can we know the format of the IR code from this sketch. I added another Serial.print to output the decimal value.

]]>
By: Sara Santos https://randomnerdtutorials.com/arduino-ir-remote-control/#comment-359293 Fri, 22 Mar 2019 14:38:14 +0000 http://randomnerdtutorials.wordpress.com/?p=300#comment-359293 In reply to Dhruv Dua.

Thanks for that suggestion.
That’s definitely an easier way to do the same thing.
Thank you
Regards,
Sara

]]>