Introduction: IR Remote Home Control Using the KY-022
Hello again!, I created a home control using the HX1838 IR Remote and the KY-022 IR Receiver.
I added some relays to it which act as rooms, devices, or lamps, and a 3 color rgb led which act like a Led strip.
+ a simple buzzer for no reason at all! :) check the following step.
Step 1: Schematic Code & Parts List.
Just connect it like the schematic, and it should work.
Parts list:
- IR Remote HX1838
- IR Receiver module KY-022
- RGB Led Module KY-016
- 4 Relays KY-019
- Buzzer
- Set of Jumper wires MM/FF/MF
- Lamp fittings + lamps (Optional)
- Arduino UNO, I used RobotDyn UNO a chinese copy with 7 analog pins.
The code has Explanation inside to. I hope you understand. Its pretty basic.
Good luck!
3 Comments
8 months ago
Sir,
Present error message is as follows:
C:\Users\karti\Downloads\IR_Remote_main_code\IR_Remote_main_code.ino:
In function 'void loop()':
C:\Users\karti\Downloads\IR_Remote_main_code\IR_Remote_main_code.ino:47:29:
warning: 'bool IRrecv::decode(decode_results*)' is deprecated: Please use
IrReceiver.decode() without a parameter and
IrReceiver.decodedIRData.<fieldname> . [-Wdeprecated-declarations]
if
(irrecv.decode(&results)) {
^
In file included from
C:\Users\karti\OneDrive\Documents\Arduino\libraries\IRremote\src/IRremote.hpp:293:0,
from
C:\Users\karti\OneDrive\Documents\Arduino\libraries\IRremote\src/IRremote.h:10,
from
C:\Users\karti\Downloads\IR_Remote_main_code\IR_Remote_main_code.ino:1:
C:\Users\karti\OneDrive\Documents\Arduino\libraries\IRremote\src/IRReceive.hpp:1657:6:
note: declared here
bool IRrecv::decode(decode_results
*aResults) {
^~~~~~
Sketch uses 5760 bytes (18%) of program storage space. Maximum is
30720 bytes.
Global variables use 564 bytes (27%) of dynamic memory, leaving 1484
bytes for local variables. Maximum is 2048 bytes.
avrdude: ser_open(): can't open device "\\.\COM2": The
system cannot find the file specified.
Failed uploading: uploading error: exit status 1
Kindly advise.
8 months ago
Hello. I made some changes to installation of Arduino IDE. And now, error message is different. Now the error is, "Relay7 is not declared in this scope". Kindly note that, (in the original sketch code) in place of Buzzer, I put "Relay7". I modified the code like this; in place of Blue Led, Red Led, Green Led & Buzzer I substituted substituted Relay 4,5,6,7. For Relay 4,5,6 there is no error shown. Only for Relay7, error is shown by the Arduino IDE. Kindly advise.
Question 8 months ago on Step 1
I followed your instructions in making IR remote control switch with KY022 and Arduino Nano. While uploading error message came. "Exit Status1 - system cannot find the file specified". Before following you also, when I followed someone else, same error used to come. Someone told, "the file is stored in one drive, which cannot be found by Arduino software. So, I uninstalled office 365, installed office 2016. Also re-installed Arduino IDE. Changed the USB ports. All possible done. Kindly advise.