reorganizing project to more general synchronizer in preparation for export/delivery to RVK museum.
This commit is contained in:
@@ -0,0 +1,135 @@
|
||||
/* DVD IR Synchronizer for Philips DVP3142/12
|
||||
* Developed for Art Installation "Thor"
|
||||
* Code written by Joe Foley <foley@ru.is>
|
||||
* 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
|
||||
*
|
||||
* IR Remote codes from IRrecvDemo
|
||||
*
|
||||
*
|
||||
* Details on the Philips RC6 coding
|
||||
* http://www.pcbheaven.com/userpages/The_Philips_RC6_Protocol/
|
||||
*
|
||||
* 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 <IRremote.h>
|
||||
|
||||
int pinGND=4; // Longer leg on the IR LED
|
||||
int pinLED=13; // The heartbeat LED on the board
|
||||
|
||||
int heartbeat=0;
|
||||
int secs;
|
||||
// Sarcity 20:58
|
||||
int playtime= 58*44+10; // Play time in seconds, you usually leave off a second or two
|
||||
|
||||
//int playtime= 10; // testing
|
||||
|
||||
IRsend irsend;
|
||||
|
||||
void setup() {
|
||||
pinMode(pinGND,OUTPUT);
|
||||
pinMode(pinLED,OUTPUT);
|
||||
Serial.begin(115200);
|
||||
|
||||
Serial.println("Panasonic DVD DVP-3142/12 Synchronizer $Rev$");
|
||||
Serial.println("For \"Sarcity\" by Thor Elis (1981)");
|
||||
Serial.println("Code by Joe Foley <foley@ru.is>");
|
||||
Serial.println("$URL$");
|
||||
Serial.println("$Id$");
|
||||
Serial.print("Playtime: ");
|
||||
secs=playtime;
|
||||
Serial.print("sec:");
|
||||
Serial.print(secs);
|
||||
Serial.print(" / mm:ss ");
|
||||
Serial.print(secs/60);
|
||||
Serial.print(":");
|
||||
Serial.print(secs % 60);
|
||||
Serial.println("");
|
||||
|
||||
secs=playtime;
|
||||
send_play();
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void loop() {
|
||||
Serial.println("Sync");
|
||||
//send_pause();
|
||||
//waitsec(2);
|
||||
|
||||
// The three players don't always see the "previous command" so we send it multiple times
|
||||
send_previous();
|
||||
send_previous();
|
||||
send_previous();
|
||||
//waitsec(2);
|
||||
// Don't send play because previous automatically starts it
|
||||
// If we hit play it will merely pause it.
|
||||
//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
|
||||
// The most critical is having everything start at the
|
||||
// same time.
|
||||
Serial.print("sec:");
|
||||
Serial.print(playtime);
|
||||
Serial.print(" / mm:ss ");
|
||||
Serial.print(t/60);
|
||||
Serial.print(":");
|
||||
Serial.print(t % 60);
|
||||
Serial.println("");
|
||||
if (heartbeat == 1) {
|
||||
digitalWrite(pinLED, HIGH);
|
||||
heartbeat = 0;
|
||||
}
|
||||
else {
|
||||
digitalWrite(pinLED, LOW);
|
||||
heartbeat = 1;
|
||||
}
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
void waitsec(int sec) {
|
||||
Serial.print("Wait ");
|
||||
Serial.print(sec);
|
||||
Serial.println(" seconds");
|
||||
delay(sec*1000);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
void send_stop() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" stop");
|
||||
irsend.sendRC6(0x10431,20);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_play() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" play");
|
||||
irsend.sendRC6(0x1042C,20);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_pause() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" pause");
|
||||
irsend.sendRC6(0x1042C,20);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_previous() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" previous");
|
||||
irsend.sendRC6(0x10421, 20);
|
||||
}
|
||||
@@ -0,0 +1,130 @@
|
||||
/* DVD IR Synchronizer for Philips DVP3142/12
|
||||
* Developed for Art Installation "West"
|
||||
* Code written by Joe Foley <foley@ru.is>
|
||||
* 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
|
||||
*
|
||||
* IR Remote codes from IRrecvDemo
|
||||
*
|
||||
* 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 <IRremote.h>
|
||||
|
||||
int pinGND=4; // Longer leg on the IR LED
|
||||
int pinLED=13; // The heartbeat LED on the board
|
||||
|
||||
int heartbeat=0;
|
||||
int secs;
|
||||
// West 25:41
|
||||
int playtime= 25*60+40; // Play time in seconds, you usually leave off a second or two
|
||||
|
||||
//int playtime= 10; // testing
|
||||
|
||||
IRsend irsend;
|
||||
|
||||
void setup() {
|
||||
pinMode(pinGND,OUTPUT);
|
||||
pinMode(pinLED,OUTPUT);
|
||||
Serial.begin(115200);
|
||||
|
||||
Serial.println("Scott DVX605 HD(Rev2) Synchronizer $Rev$");
|
||||
Serial.println("For \"West\" by Steina Vasulka (1983)");
|
||||
Serial.println("Code by Joe Foley <foley@ru.is>");
|
||||
Serial.println("$URL$");
|
||||
Serial.println("$Id$");
|
||||
Serial.print("Playtime: ");
|
||||
secs=playtime;
|
||||
Serial.print("sec:");
|
||||
Serial.print(secs);
|
||||
Serial.print(" / mm:ss ");
|
||||
Serial.print(secs/60);
|
||||
Serial.print(":");
|
||||
Serial.print(secs % 60);
|
||||
Serial.println("");
|
||||
|
||||
secs=playtime;
|
||||
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void loop() {
|
||||
Serial.println("Sync");
|
||||
//send_pause();
|
||||
//waitsec(2);
|
||||
|
||||
send_previous();
|
||||
send_previous();
|
||||
send_previous();
|
||||
//waitsec(2);
|
||||
// Don't send play because previous automatically starts it
|
||||
// If we hit play it will merely pause it.
|
||||
//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
|
||||
// The most critical is having everything start at the
|
||||
// same time.
|
||||
Serial.print("sec:");
|
||||
Serial.print(playtime);
|
||||
Serial.print(" / mm:ss ");
|
||||
Serial.print(t/60);
|
||||
Serial.print(":");
|
||||
Serial.print(t % 60);
|
||||
Serial.println("");
|
||||
if (heartbeat == 1) {
|
||||
digitalWrite(pinLED, HIGH);
|
||||
heartbeat = 0;
|
||||
}
|
||||
else {
|
||||
digitalWrite(pinLED, LOW);
|
||||
heartbeat = 1;
|
||||
}
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
void waitsec(int sec) {
|
||||
Serial.print("Wait ");
|
||||
Serial.print(sec);
|
||||
Serial.println(" seconds");
|
||||
delay(sec*1000);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
void send_stop() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" stop");
|
||||
irsend.sendNEC(0xFFC837,32);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_play() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" play");
|
||||
irsend.sendNEC(0xFFF00F,32);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_pause() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" pause");
|
||||
irsend.sendNEC(0xFFD02F,32);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_previous() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" previous");
|
||||
irsend.sendNEC(0xFF50AF, 32);
|
||||
}
|
||||
@@ -0,0 +1,132 @@
|
||||
/* DVD IR Synchronizer for Toshiba SD1091EKE
|
||||
* Developed for Art Installation by Steina
|
||||
* Code written by Joe Foley <foley@ru.is>
|
||||
* on 2013-09-08
|
||||
*
|
||||
* Requires libraries:
|
||||
* Arduino-IRremote https://github.com/shirriff/Arduino-IRremote
|
||||
*
|
||||
* More codes at http://www.lirc.org/
|
||||
* The compatible remote is SE-R0301
|
||||
* We use the codes for the SE-R0031
|
||||
* http://lirc.sourceforge.net/remotes/toshiba/SE-R0031
|
||||
* Note that this has some similar codes
|
||||
*
|
||||
* 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 <IRremote.h>
|
||||
|
||||
int pinGND=4; // Longer leg on the IR LED
|
||||
int pinLED=13; // The heartbeat LED on the board
|
||||
|
||||
int secs;
|
||||
int heartbeat=0;
|
||||
|
||||
// West 25:41
|
||||
int playtime= 25*60+40; // set here your DVD title playtime in sec leave a little extra
|
||||
|
||||
IRsend irsend;
|
||||
|
||||
void setup() {
|
||||
pinMode(pinGND,OUTPUT);
|
||||
pinMode(pinLED,OUTPUT);
|
||||
Serial.begin(115200);
|
||||
|
||||
|
||||
Serial.println("Toshiba DVD SD1091EKE Synchronizer $Rev$");
|
||||
Serial.println("For \"West\" by Steina Vasulka (1983)");
|
||||
Serial.println("Code by Joe Foley <foley@ru.is>");
|
||||
Serial.println("$URL$");
|
||||
Serial.println("$Id$");
|
||||
Serial.print("Playtime: ");
|
||||
secs=playtime;
|
||||
Serial.print("sec:");
|
||||
Serial.print(secs);
|
||||
Serial.print(" / mm:ss ");
|
||||
Serial.print(secs/60);
|
||||
Serial.print(":");
|
||||
Serial.print(secs % 60);
|
||||
Serial.println("");
|
||||
|
||||
secs=playtime;
|
||||
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void loop() {
|
||||
Serial.println("Sync");
|
||||
// The DVD player starts playing automatically, so we should pause it
|
||||
send_pause();
|
||||
waitsec(2);
|
||||
|
||||
send_previous();
|
||||
// on this model, previous immediately starts playing
|
||||
|
||||
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
|
||||
// The most critical is having everything start at the
|
||||
// same time.
|
||||
Serial.print("sec:");
|
||||
Serial.print(playtime);
|
||||
Serial.print(" / mm:ss ");
|
||||
Serial.print(t/60);
|
||||
Serial.print(":");
|
||||
Serial.print(t % 60);
|
||||
Serial.println("");
|
||||
if (heartbeat == 1) {
|
||||
digitalWrite(pinLED, HIGH);
|
||||
heartbeat = 0;
|
||||
}
|
||||
else {
|
||||
digitalWrite(pinLED, LOW);
|
||||
heartbeat = 1;
|
||||
}
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
void waitsec(int sec) {
|
||||
Serial.print("Wait ");
|
||||
Serial.print(sec);
|
||||
Serial.println(" seconds");
|
||||
delay(sec*1000);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
// NEC data format: first comes the pre-data bits, then the command code
|
||||
void send_stop() {
|
||||
Serial.println(" stop");
|
||||
irsend.sendNEC(0xA25D28D7,32);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_play() {
|
||||
// Note that play and pause are a toggle for the same command
|
||||
Serial.println(" play");
|
||||
irsend.sendNEC(0xA25DA857, 32);
|
||||
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_pause() {
|
||||
// On this model, pause and play are the same button so it toggles
|
||||
// We use the "step" command which will always pause, no matter
|
||||
// how many times we press it.
|
||||
Serial.println(" step/pause");
|
||||
irsend.sendNEC(0xA25D00FF,32);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_previous() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" previous");
|
||||
irsend.sendNEC(0xA25DC43B, 32);
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
/* DVD IR Synchronizer for Toshiba SD590EKE
|
||||
* Developed for Art Installation "Dawn" by Sigrun Hardardottir<sigrun@stalverk.is>
|
||||
* Code written by Joe Foley <foley@ru.is>
|
||||
* on 2013-09-08
|
||||
*
|
||||
* Requires libraries:
|
||||
* Arduino-IRremote https://github.com/shirriff/Arduino-IRremote
|
||||
*
|
||||
* IR Remote codes from SE-R0313
|
||||
* http://lirc.sourceforge.net/remotes/toshiba/SE-R0313
|
||||
*
|
||||
* 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 <IRremote.h>
|
||||
|
||||
int pinGND=4; // Longer leg on the IR LED
|
||||
int pinLED=13; // The heartbeat LED on the board
|
||||
|
||||
int heartbeat=0;
|
||||
int secs;
|
||||
// Dawn 61:36
|
||||
int playtime= 61*60+35; // set here your DVD title playtime in sec leave a little extra
|
||||
|
||||
IRsend irsend;
|
||||
|
||||
void setup() {
|
||||
pinMode(pinGND,OUTPUT);
|
||||
pinMode(pinLED,OUTPUT);
|
||||
Serial.begin(115200);
|
||||
|
||||
Serial.println("Toshiba DVD SD590EKE Synchronizer $Rev$");
|
||||
Serial.println("For \"Dawn\" by Sigrun Hardar on 1986");
|
||||
Serial.println("Code by Joe Foley <foley@ru.is>");
|
||||
Serial.println("$URL$");
|
||||
Serial.println("$Id$");
|
||||
Serial.print("Playtime: ");
|
||||
secs=playtime;
|
||||
Serial.print("sec:");
|
||||
Serial.print(secs);
|
||||
Serial.print(" / mm:ss ");
|
||||
Serial.print(secs/60);
|
||||
Serial.print(":");
|
||||
Serial.print(secs % 60);
|
||||
Serial.println("");
|
||||
|
||||
// The DVD player starts playing automatically, so maybe we should pause it
|
||||
//send_pause();
|
||||
//waitsec(2);
|
||||
secs=playtime;
|
||||
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void loop() {
|
||||
Serial.println("Sync");
|
||||
send_pause();
|
||||
waitsec(2);
|
||||
send_previous();
|
||||
//waitsec(2);
|
||||
|
||||
//send_play(); // this should not be necessary, but just in case
|
||||
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
|
||||
// The most critical is having everything start at the
|
||||
// same time.
|
||||
Serial.print("sec:");
|
||||
Serial.print(playtime);
|
||||
Serial.print(" / mm:ss ");
|
||||
Serial.print(t/60);
|
||||
Serial.print(":");
|
||||
Serial.print(t % 60);
|
||||
Serial.println("");
|
||||
if (heartbeat == 1) {
|
||||
digitalWrite(pinLED, HIGH);
|
||||
heartbeat = 0;
|
||||
}
|
||||
else {
|
||||
digitalWrite(pinLED, LOW);
|
||||
heartbeat = 1;
|
||||
}
|
||||
delay(1000);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**************************************************************/
|
||||
void waitsec(int sec) {
|
||||
Serial.print("Wait ");
|
||||
Serial.print(sec);
|
||||
Serial.println(" seconds");
|
||||
delay(sec*1000);
|
||||
}
|
||||
|
||||
|
||||
/********************************************************************/
|
||||
void send_stop() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" stop");
|
||||
irsend.sendNEC(0xA25D28D7,32);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_play() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" play");
|
||||
irsend.sendNEC(0xA25DA857,32);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_pause() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" pause");
|
||||
irsend.sendNEC(0xA25D00FF, 32);
|
||||
}
|
||||
|
||||
/********************************************************************/
|
||||
void send_previous() {
|
||||
// First comes the pre-data bits, then the command code
|
||||
Serial.println(" previous");
|
||||
irsend.sendNEC(0xA25DC43B, 32);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
Reference in New Issue
Block a user