From 72b22c8f872eb5887b468ef36fac8fb1da8d7df8 Mon Sep 17 00:00:00 2001 From: "foley@ru.is" Date: Wed, 11 Sep 2013 14:46:27 +0000 Subject: [PATCH] Used IRRecvDemo to get the RC6 codes for the Philips DVP3142 --- .../Synchronizer_Philips_DVP3142_12.pde | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/dawn/Synchronizer_Philips_DVP3142_12/Synchronizer_Philips_DVP3142_12.pde b/dawn/Synchronizer_Philips_DVP3142_12/Synchronizer_Philips_DVP3142_12.pde index d021e73..5b4bd99 100644 --- a/dawn/Synchronizer_Philips_DVP3142_12/Synchronizer_Philips_DVP3142_12.pde +++ b/dawn/Synchronizer_Philips_DVP3142_12/Synchronizer_Philips_DVP3142_12.pde @@ -2,14 +2,14 @@ * Developed for Art Installation "Thor" * Code written by Joe Foley * on 2013-09-08 - * !!!WARNING: THIS CODE DOES NOT WORK!!! + * * * Requires libraries: * Arduino-IRremote https://github.com/shirriff/Arduino-IRremote * Instructions http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html * - * IR Remote codes - * http://lirc.sourceforge.net/remotes/philips/DVP-5982 + * IR Remote codes from IRrecvDemo + * * * Details on the Philips RC6 coding * http://www.pcbheaven.com/userpages/The_Philips_RC6_Protocol/ @@ -26,7 +26,7 @@ int pinLED=13; // The heartbeat LED on the board int heartbeat=0; int secs; -int playtime= 6*60+9; // set here ypur DVD title playtime in sec leave a little extra +int playtime= 10; // set here ypur DVD title playtime in sec leave a little extra //int playtime= 10; // testing IRsend irsend; @@ -39,7 +39,6 @@ void setup() { Serial.println("Panasonic DVD DVP-3142/12 Synchronizer $Rev$"); Serial.println("For installation \"Thor\""); Serial.println("Code by Joe Foley "); - Serial.println("!!!WARNING: THIS CODE DOES NOT WORK!!!"); Serial.println("$URL$"); Serial.println("$Id$"); Serial.print("Playtime: "); @@ -63,9 +62,11 @@ void setup() { void loop() { Serial.println("Sync"); send_previous(); - waitsec(2); + //waitsec(2); + // Don't send play because previous automatically starts it + // If we hit play it will merely pause it. + //send_play(); - send_play(); for(int t = 0; t < playtime; t++) { // This will not give us perfect 1 second timing // but it is good enough for most video applications @@ -107,26 +108,26 @@ void waitsec(int sec) { void send_stop() { // First comes the pre-data bits, then the command code Serial.println(" stop"); - irsend.sendNEC(0xA25D28D7,32); + irsend.sendNEC(0x10431,20); } /********************************************************************/ void send_play() { // First comes the pre-data bits, then the command code Serial.println(" play"); - irsend.sendNEC(0xA25DA857,32); + irsend.sendRC6(0x1042C,20); } /********************************************************************/ void send_pause() { // First comes the pre-data bits, then the command code Serial.println(" pause"); - irsend.sendRC6(0xEFD3, 16); + irsend.sendRC6(0x1042C,20); } /********************************************************************/ void send_previous() { // First comes the pre-data bits, then the command code Serial.println(" previous"); - irsend.sendNEC(0xA25DC43B, 32); -} + irsend.sendRC6(0x10421, 20); +}