Loading... Please wait...

IR LED

IR LED

This example uses the IRremote library which can be found here. IrRemote offers many different IR remote protocals for various manufacturers so the hard work has already been done. If you need to know what your remote is sending when you press a key, take a look at the remote control tutorial where there is example code for reading a remote control transmission.

Circuit

Connect the cathod of an IR LED e.g. TSAL7400 to GND.

Connect the anode to a 200 or 330 ohm resistor. Then connect the other end of the resistor to pin 3 (this is fixed, you cannot use any other pin).

Code

#include <IRremote.h>

IRsend irsend;

void setup() {
}

void loop() {
    irsend.sendSony(0x68B92, 20);
    delay(100);
    irsend.sendSony(0x68B92, 20);
    delay(100);
    irsend.sendSony(0x68B92, 20);
    delay(300000);
}

 

 

What's News

newsletter

Copyright 2017 oddWires. All Rights Reserved.
 Sitemap | oddWires