Ks0026 keyestudio Digital IR Receiver Module: Difference between revisions

From Keyestudio Wiki
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
<br>
==Introduction==
==Introduction==
IR is widely used in remote control. With this IR receiver, Arduino project is able to receive command from any IR remoter controllers if you have the right decoder. Well, it will be also easy to make your own IR controller using IR transmitter.
IR is widely used in remote control. With this IR receiver, Arduino project is able to receive command from any IR remoter controllers if you have right decoder. Well, it will be also easy to make your own IR controller using IR transmitter.
<br>[[File:KS0026 (3).jpg|500px|frameless|thumb]]<br>
<br>[[File:KS0026 (3).jpg|500px|frameless|thumb]]<br>


<br>
==Specification==
==Specification==
*Power Supply: 5V
*Power Supply: 5V
*Interface: Digital
*Interface: Digital
*Modulation Frequency: 38Khz
*Modulation Frequency: 38Khz
*Module Interface Socket: JST PH2.0
*Size: 30*20mm
*Weight: 4g


<br>
==Connection Diagram ==
==Connection Diagram ==
The following image shows a suggested connection method. You may use any Digital I/O pin that is not in use by another device. 
The following image shows a suggested connection method. You may use any Digital I/O pin that is not in use by another device. 
<br>[[File:262.png|500px|frameless|thumb]]<br>
<br>[[File:262.png|500px|frameless|thumb]]<br>


'''NOTE:''' In the sample code below Digital pin 11 is in use, you may either change your wiring or change the sample code to match.
<span style=color:red> '''NOTE:''' In the sample code below Digital pin 11 is in use, you may either change your wiring or change the sample code to match. <br>


<br>
==Sample Code ==
==Sample Code ==
<span style=color:red> '''Note:''' before compiling the code, do remember to place the library into libraries directory of Arduino IDE. Otherwise, compiling will fail. <br>


<pre>
<pre>
#include <IRremote.h>
#include <IRremote.h>
int RECV_PIN = 11;
 int RECV_PIN = 11;
IRrecv irrecv(RECV_PIN);
 IRrecv irrecv(RECV_PIN);
decode_results results;
 decode_results results;
void setup()
 void setup()
{
{
  Serial.begin(9600);
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
  irrecv.enableIRIn(); // Start the receiver
}
}
void loop() {
 void loop() {
  if (irrecv.decode(&results)) {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
    irrecv.resume(); // Receive the next value
  }
  }
}
}
</pre>
</pre>


== Test ==
<br>
<br>[[File:KS0026 (7).jpg|500px|frameless|thumb]]<br>
<span style=color:red>
IR Remote Library includes some sample codes for sending and receiving: <br>
[https://github.com/shirriff/Arduino-IRremote IR Remote Library]


==Resources ==
<br>
== Result ==
Done wiring and uploading the code, then control the IR receiver module by an infrared remote control, D1 led will flash. Shown as below.
<br>[[File:KS0349 33-4.png|500px|frameless|thumb]]<br>


'''Library'''


IR Remote Library includes some sample codes for sending and receiving:
<br>
[https://github.com/shirriff/Arduino-IRremote IR Remote Library]
==Resources ==


'''PDF'''
* '''PDF'''<br>
https://drive.google.com/open?id=1-jbx7joIypBtdw9GL3NvKs64W-eBbnZw
https://drive.google.com/open?id=1-jbx7joIypBtdw9GL3NvKs64W-eBbnZw


'''Video'''
* '''Video'''<br>
http://video.keyestudio.com/ks0026/


http://www.keyestudio.com/wp/ks0026-ks0027/


<br>
==Buy from ==
==Buy from ==
'''Official Website'''


http://www.keyestudio.com/keyestudio-digital-ir-receiver-module-for-arduino.html
*[https://www.keyestudio.com/free-shipping-keyestudio-digital-ir-infrared-receiver-module-for-arduino-uno-r3-mega-2560-r3-p0151.html   '''Official Website''']
 
*[https://www.aliexpress.com/store/product/Free-shipping-Keyestudio-38kHz-1838-Universal-Digital-IR-Infrared-Receiver-Module-for-Arduino-UNO-R3/4247007_32887932794.html?spm=2114.12010615.8148356.13.53827852viTGyz      Shop on aliexpress ]






[[Category: Sensor]]
[[Category: Sensor]]

Revision as of 15:53, 12 April 2019


Introduction

IR is widely used in remote control. With this IR receiver, Arduino project is able to receive command from any IR remoter controllers if you have right decoder. Well, it will be also easy to make your own IR controller using IR transmitter.
thumb


Specification

  • Power Supply: 5V
  • Interface: Digital
  • Modulation Frequency: 38Khz


Connection Diagram

The following image shows a suggested connection method. You may use any Digital I/O pin that is not in use by another device. 
thumb

NOTE: In the sample code below Digital pin 11 is in use, you may either change your wiring or change the sample code to match.


Sample Code

Note: before compiling the code, do remember to place the library into libraries directory of Arduino IDE. Otherwise, compiling will fail.

#include <IRremote.h>
 int RECV_PIN = 11;
 IRrecv irrecv(RECV_PIN);
 decode_results results;
 void setup()
{
  Serial.begin(9600);
  irrecv.enableIRIn(); // Start the receiver
}
 void loop() {
  if (irrecv.decode(&results)) {
    Serial.println(results.value, HEX);
    irrecv.resume(); // Receive the next value
  }
}


IR Remote Library includes some sample codes for sending and receiving:
IR Remote Library


Result

Done wiring and uploading the code, then control the IR receiver module by an infrared remote control, D1 led will flash. Shown as below.
thumb



Resources

  • PDF

https://drive.google.com/open?id=1-jbx7joIypBtdw9GL3NvKs64W-eBbnZw

  • Video

http://video.keyestudio.com/ks0026/



Buy from