Ks0026 keyestudio Digital IR Receiver Module: Difference between revisions
Keyestudio (talk | contribs) (→Result) |
Keyestudio (talk | contribs) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 14: | Line 14: | ||
==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: | <br>[[File:Ks0026.png|700px|frameless|thumb]]<br> | ||
<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> | <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> | ||
Line 52: | Line 52: | ||
<br> | <br> | ||
==Resources == | ==Resources == | ||
* ''' | * '''All Info.'''<br> | ||
https:// | https://fs.keyestudio.com/KS0026 | ||
* '''Video'''<br> | * '''Video'''<br> | ||
Line 63: | Line 62: | ||
<br> | <br> | ||
==Buy from == | ==Buy from == | ||
Latest revision as of 10:49, 2 March 2021
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.
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.
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.
Resources
- All Info.
https://fs.keyestudio.com/KS0026
- Video
http://video.keyestudio.com/ks0026/