Editor Version ×
Standard

1.Easy to use and quick to get started

2.The process supports design scales of 300 devices or 1000 pads

3.Supports simple circuit simulation

4.For students, teachers, creators

Profession

1.Brand new interactions and interfaces

2.Smooth support for design sizes of over 5,000 devices or 10,000 pads

3.More rigorous design constraints, more standardized processes

4.For enterprises, more professional users

Ongoing

STD ARDUINO IR HOME AUTOMATION SYSTEM SHEILD copy

License: Public Domain

Mode: Editors' pick

Cloned from ARDUINO IR HOME AUTOMATION SYSTEM SHEILD

  • 407
  • 0
  • 0
Update time: 2019-01-11 23:03:13
Creation time: 2019-01-11 23:03:12
Description
with this sheild u can controll a 2 relays using an IR remote.BELOW IS THE CODE. AND NOTE,(IF THE REMOTE CORDIATES ARE DIFFERENT COMPARING TO THE ONE IN THE CODE,SIMPLY GO TO EXAMPLES>IR REMOTE>IR RECIV_DUMP. ONCE U GET THE NUMBERS U CAN TYPTE IT IN UR CODE. ________________THE CODE____________________ /* * IRremote: IRrecvDemo - demonstrates receiving IR codes with IRrecv * An IR detector/demodulator must be connected to the input RECV_PIN. * Version 0.1 July, 2009 * Copyright 2009 Ken Shirriff * http://arcfn.com */ #include int RECV_PIN = 10; int RELAY_PIN = 6; int RELAY_PIN2 = 8; IRrecv irrecv(RECV_PIN); decode_results results; // Dumps out the decode_results structure. // Call this after IRrecv::decode() // void * to work around compiler issue //void dump(void *v) { // decode_results *results = (decode_results *)v void dump(decode_results *results) { int count = results->rawlen; } void setup() { pinMode(RELAY_PIN, OUTPUT); pinMode(RELAY_PIN2,OUTPUT); pinMode(13, OUTPUT); Serial.begin(9600); irrecv.enableIRIn(); // Start the receiver } int on = 0; unsigned long last = millis(); #define BUTTON_1 0xFF30CF #define BUTTON_2 0xFF18E7 #define BUTTON_3 0xFF7A85 #define BUTTON_0 0xFF6897 #define BUTTON_OK 0xFF629D void loop() { if (irrecv.decode(&results)) { if (results.value == BUTTON_2) { on = !on; digitalWrite(RELAY_PIN, on ? HIGH : LOW); digitalWrite(13, on ? HIGH : LOW); dump(&results); if (results.value == BUTTON_1) { on = !on; digitalWrite(RELAY_PIN2, on ? HIGH : LOW); digitalWrite(13, on ? HIGH : LOW); dump(&results); } if (results.value == BUTTON_OK) { on = !on; digitalWrite(RELAY_PIN2, on ? HIGH : LOW); digitalWrite(RELAY_PIN, on ? HIGH : LOW); digitalWrite(13, on ? HIGH : LOW); dump(&results); } irrecv.resume(); // Receive the next value } }
Design Drawing
schematic diagram
1 /
PCB
1 /
The preview image was not generated, please save it again in the editor.
Project Attachments
Empty
Project Members
Related Projects
Change a batch
Loading...
Add to album ×

Loading...

reminder ×

Do you need to add this project to the album?

服务时间

周一至周五 9:00~18:00
  • 0755 - 2382 4495
  • 153 6159 2675

服务时间

周一至周五 9:00~18:00
  • 立创EDA微信号

    easyeda

  • QQ交流群

    664186054

  • 立创EDA公众号

    lceda-cn