diff --git a/dawn/Philips_codefinder/Philips_codefinder.pde b/dawn/Philips_codefinder/Philips_codefinder.pde new file mode 100755 index 0000000..e6531aa --- /dev/null +++ b/dawn/Philips_codefinder/Philips_codefinder.pde @@ -0,0 +1,57 @@ +/* Philips DVD player codefinder + * Code written by Joe Foley + * on 2013-09-08 + * + * Requires libraries: + * Arduino-IRremote https://github.com/shirriff/Arduino-IRremote + * Instructions http://www.righto.com/2009/08/multi-protocol-infrared-remote-library.html + * + * The IRremote library uses Pin 3 for the Anode (longer pin) + * We have made a ground pin on Pin 4 for the Cathode (shorter pin) + */ + + +#include + +int pinGND=4; // Longer leg on the IR LED +int pinLED=13; // The heartbeat LED on the board + + +IRsend irsend; +unsigned long testcode; +void setup() { + pinMode(pinGND,OUTPUT); + pinMode(pinLED,OUTPUT); + Serial.begin(115200); + + Serial.println("Philips Codefinder $Rev$"); + Serial.println("Code by Joe Foley "); + Serial.println("$URL$"); + Serial.println("$Id$"); + +} + +/********************************************************************/ +void loop() { + for (int address = 0; address < 0x100; address++) { + for (int command = 0; command < 0x100; command++) { + Serial.print("address: "); + Serial.print(address, HEX); + Serial.print(" command: "); + Serial.print(command, HEX); + testcode = ( address << 16 ) + command; + Serial.print(" testcode: "); + Serial.println(testcode, HEX); + irsend.sendRC6(testcode, 16); + } + } + +} + +/**************************************************************/ +void waitsec(int sec) { + Serial.print("Wait "); + Serial.print(sec); + Serial.println(" seconds"); + delay(sec*1000); +}