]> git.piffa.net Git - arduino/blob - books/pdummies/Libraries/IRremote/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino
first commit
[arduino] / books / pdummies / Libraries / IRremote / examples / JVCPanasonicSendDemo / JVCPanasonicSendDemo.ino
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 }