[vc_row][vc_column width=”1/1″][vc_column_text]Since the Consumer IR protocols are for the most part not standardized, computers and universal remotes often memorize a bit stream, possibly with compression and possibly without determining the actual bit rate, and play it back.
In this post, we show how to use Arduino to receive and decode the IR remote control.
[/vc_column_text][vc_tour][vc_tab title=”BOM” tab_id=”1384375628-1-85″][vc_column_text]1. Arduino Uno experiment platform
2. Infrared receiver diode
3. Infrared remote control
4. Jump wire[/vc_column_text][/vc_tab][vc_tab title=”Wire Diagram” tab_id=”1384375628-2-26″][vc_column_text]
[/vc_column_text][/vc_tab][vc_tab title=”Explaination” tab_id=”1384375953317-2-1″][vc_column_text]Copy the following library (IRremote) to arduino/libraries. Restart Arduino IDE.[/vc_column_text][/vc_tab][vc_tab title=”Sample Code” tab_id=”1384375978266-3-8″][vc_column_text]
/*
Decoder infrared remote control
*/
#include <IRremote.h>
int RECV_PIN = 11; //The infrared receiver OUTPUT is connected to pin 11
IRrecv irrecv(RECV_PIN); // Define IRrecv to receive the infrared signal
decode_results results;
void setup()
{
Serial.begin(9600);
irrecv.enableIRIn();
}
void loop() {
if (irrecv.decode(&amp;amp;results))
{
Serial.print("irCode:");
Serial.print(results.value,HEX);
delay(100); //debounce
Serial.print("bits:");
Serial.println(results.bits);
irrecv.resume();
}
}
Download code here ( IR_Receiver).[/vc_column_text][/vc_tab][/vc_tour][/vc_column][/vc_row]
Leave a Reply
You must be logged in to post a comment.