Using an IR Remote with LEDs
How to use IR to do stuff!
Components and supplies
Resistor 221 ohm
Breadboard (generic)
Arduino UNO
LED (generic)
Jumper wires (generic)
IR Reciever (VS1838)
Apps and platforms
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

Schematics
Schematics

ir_with_leds_I2UyZGhOzz.fzz
ir_with_leds_I2UyZGhOzz.fzz
Comments
Only logged in users can leave comments