Mercurial > code > home > repos > homeauto
diff service/busyboxArduino/IRremote/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino @ 960:a5c7e285fef5
add IRremote
Ignore-this: c295c68f923af8d072841f1d7c1e5ab8
darcs-hash:20150120015526-312f9-ed34137ad90e3436dcaa2ec10358705a4f87a80b
author | drewp <drewp@bigasterisk.com> |
---|---|
date | Mon, 19 Jan 2015 17:55:26 -0800 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/service/busyboxArduino/IRremote/examples/JVCPanasonicSendDemo/JVCPanasonicSendDemo.ino Mon Jan 19 17:55:26 2015 -0800 @@ -0,0 +1,29 @@ +/* + * IRremote: IRsendDemo - demonstrates sending IR codes with IRsend + * An IR LED must be connected to Arduino PWM pin 3. + * Version 0.1 July, 2009 + * Copyright 2009 Ken Shirriff + * http://arcfn.com + * JVC and Panasonic protocol added by Kristian Lauszus (Thanks to zenwheel and other people at the original blog post) + */ +#include <IRremote.h> + +#define PanasonicAddress 0x4004 // Panasonic address (Pre data) +#define PanasonicPower 0x100BCBD // Panasonic Power button + +#define JVCPower 0xC5E8 + +IRsend irsend; + +void setup() +{ +} + +void loop() { + irsend.sendPanasonic(PanasonicAddress,PanasonicPower); // This should turn your TV on and off + + irsend.sendJVC(JVCPower, 16,0); // hex value, 16 bits, no repeat + delayMicroseconds(50); // see http://www.sbprojects.com/knowledge/ir/jvc.php for information + irsend.sendJVC(JVCPower, 16,1); // hex value, 16 bits, repeat + delayMicroseconds(50); +}