Mercurial > code > home > repos > homeauto
comparison service/busyboxArduino/IRremote/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino @ 155:e88308cea843
add IRremote
Ignore-this: c295c68f923af8d072841f1d7c1e5ab8
author | drewp@bigasterisk.com |
---|---|
date | Mon, 19 Jan 2015 17:55:26 -0800 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
154:58c47bfe0ce5 | 155:e88308cea843 |
---|---|
1 /* | |
2 * IRremote: IRsendDemo - demonstrates sending IR codes with IRsend | |
3 * An IR LED must be connected to Arduino PWM pin 3. | |
4 * Version 0.1 July, 2009 | |
5 * Copyright 2009 Ken Shirriff | |
6 * http://arcfn.com | |
7 * JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post) | |
8 */ | |
9 #include <IRremote.h> | |
10 | |
11 #define PanasonicAddress 0x4004 // Panasonic address (Pre data) | |
12 #define PanasonicPower 0x100BCBD // Panasonic Power button | |
13 | |
14 #define JVCPower 0xC5E8 | |
15 | |
16 IRsend irsend; | |
17 | |
18 void setup() | |
19 { | |
20 } | |
21 | |
22 void loop() { | |
23 irsend.sendPanasonic(PanasonicAddress,PanasonicPower); // This should turn your TV on and off | |
24 | |
25 irsend.sendJVC(JVCPower, 16,0); // hex value, 16 bits, no repeat | |
26 delayMicroseconds(50); // see http://www.sbprojects.com/knowledge/ir/jvc.php for information | |
27 irsend.sendJVC(JVCPower, 16,1); // hex value, 16 bits, repeat | |
28 delayMicroseconds(50); | |
29 } |