An infrared transmitter module (as shown below) is a device that uses 38K modulation signal generated by MCU to emit infrared rays.
– 1 * SunFounder Uno board
– 1 * USB data cable
– 1 * Infrared transmitter module
– 1 * LCD1602
– 1 * Potentiometer
– Several jumper wires
An infrared transmitter is a device applied in remote control. It can emit rays within a certain range through an infrared transmitting tube so as to control signals. Infrared transmitter is widely used in consumer electronics, industry and communication, etc.
In this experiment, connect pin S of the infrared transmitter module to D3 to build a simple circuit. When the coded value for an infrared ray is input by programming and then the infrared transmitter module emits the infrared ray, the LED attached to pin 13 will light up. In addition, the coded value of the infrared ray will be displayed on LCD1602.
Step 1: Build the circuit
Infrared Transmitter Module SunFounder Uno
– —————————————– GND
LCD1602 connection: connect pin RS to digital pin 5; R/W to GND; E to digital pin 4; D4-D7 to digital pin 9 to 12; VSS to GND; VDD to 5V; A to 3.3V; K to GND
Potentiometer connection: Connect the middle pin to VO of LCD1602 and any other pin to GND
Step 3: Compile
Step 4: Upload the sketch to SunFounder Uno
Now, you can see the infrared transmitter emit infrared rays through a camera or your phone camera. At the same time, the LED attached to pin 13 on SunFounder Uno board lights up and a coded value is displayed on the LCD.
IRsend irsend;// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(5, 4, 9, 10, 11, 12);
const int ledPin = 13;void setup()
lcd.begin(16, 2); // set up the LCD’s number of columns and rows:
lcd.print(” 0xFFA25D “);