Using an IR Remote with LEDs

How to use IR to do stuff!

Jan 30, 2017

9072 views

2 respects

Components and supplies

3

Resistor 221 ohm

1

Breadboard (generic)

1

Arduino UNO

3

LED (generic)

10

Jumper wires (generic)

1

IR Reciever (VS1838)

Apps and platforms

1

Arduino IDE

Project description

Code

IR with LEDs Manual

arduino

In this code, you'll have to replace the value of the button you want to use for the "0xFD08F7" on row 29, as well as in row 32 and 35. With this code, once you press a button, an LED will turn on, and it won't turn off until you press the same button again. If you want them to turn off automatically after a certain amount of time, I left another code after this one.

IR with LEDs Auto

arduino

However, with this code, once you turn on an LED by pressing the button, it will automatically go off after 2000 miliseconds (you can change this in the code in row 25, 32, 39)

IR with LEDs Manual

arduino

In this code, you'll have to replace the value of the button you want to use for the "0xFD08F7" on row 29, as well as in row 32 and 35. With this code, once you press a button, an LED will turn on, and it won't turn off until you press the same button again. If you want them to turn off automatically after a certain amount of time, I left another code after this one.

Downloadable files

ir_with_leds_I2UyZGhOzz.fzz

ir_with_leds_I2UyZGhOzz.fzz

Schematics

Schematics

Image

Schematics

Schematics

Image

ir_with_leds_I2UyZGhOzz.fzz

ir_with_leds_I2UyZGhOzz.fzz

Comments

Only logged in users can leave comments

SAnwandter1

0 Followers

0 Projects

0