Control LED Brightness With Remote and Arduino

7,121

14

2

Posted

Introduction: Control LED Brightness With Remote and Arduino

We will make a Remote Control LED brightness controller, it is very simple. Comment below your question if you have any, I will love to answer them all. My blog for Latest Tech News and Some Projects Electronics Time.

Step 1: Things You Need

  • Arduino
  • IR sensor
  • LED
  • Any Remote Control
  • Battery
  • Battery clip
  • Arduino Power Cord
  • Bread board
  • Some connecting Wires

Step 2: Circuit Daigram

Simply Hooking up IR receive pin to pin 11 and other two pins of IR Sensor to 5V Supply and Ground of arduino. Connect LED to pin 9 and Ground.

Step 3: Code

Simply run the code in your Arduino IDE and see the beautiful project i action. But, first check your remote control signal by using the IR library on Github. FYI the IR library runs on Arduino IDE 1.0.5 so, if you have arduino IDE version 1.0.6 then downgrade it to 1.0.5 after saving your projects to other place in your PC. Link For Previous versions of IDE.

Step 4: Video Tutorial.

Subscribe to my blog Electronics Time for latest projects and TECH news. Hope you Enjoy the project.

Share

Recommendations

  • Epilog Challenge 9

    Epilog Challenge 9
  • Sew Warm Contest 2018

    Sew Warm Contest 2018
  • Gluten Free Challenge

    Gluten Free Challenge
user

We have a be nice policy.
Please be positive and constructive.

Tips

Questions

2 Comments

Looking For This T_T
Tnx ^_^

Here is the code for Latest 1.6.4 IDE

#include <IRremote.h> // use the library for IR

int RECV_PIN2 = 11; // pin 1 of IR receiver to Arduino digital pin 11

const int ledPin = 9;

int Led = 4;

int fadeValue;

int lastCounter = 1;

int counter;

IRrecv irrecv2(RECV_PIN2); // create instance of 'irrecv'

decode_results results2;

void setup()

{

Serial.begin(9600);

pinMode(ledPin, OUTPUT);

irrecv2.enableIRIn();

}

void loop()

{

counter = lastCounter;

if (irrecv2.decode(&results2))

{

if (results2.value == 1234924810)

{

counter ++;

}

if (results2.value == 4127085536)

{

counter --;

}

irrecv2.resume();

}

if (counter == 5)

{

digitalWrite( Led , HIGH);

delay(500);

digitalWrite( Led , LOW);

delay(100);

}

if (counter > 5){ //maximum for counter = 5

counter = 1;

}

if (counter < 2){ //minimum for counter = 1

counter = 1;

}

switch (counter){ //depending on the counter the fadevalue is sent to the led

case 1:

fadeValue = 00;

break;

case 2:

fadeValue = 50;

break;

case 3:

fadeValue = 120;

break;

case 4:

fadeValue = 185;

break;

case 5:

fadeValue = 255;

break;

}

analogWrite(ledPin , fadeValue); //set led with PWM value

lastCounter=counter;

}

Thankx for the concept