added in installation details, copied into installation with new name, filled in new labels and commented out old labels

This commit is contained in:
foley@ru.is
2014-01-14 23:58:16 +00:00
parent 06693a54ff
commit 636dffc3dc
3 changed files with 163 additions and 25 deletions

View File

@@ -1,7 +1,8 @@
const string DESCRIPTION="IR Synchronizer for Sony Blu-ray player BDP-S790";
const string AUTHOR="Joe Foley <foley@ru.is>";
const string REVISION="$Rev$";
const string SVNID="$Id$";
const String DESCRIPTION="IR Synchronizer for Sony Blu-ray player BDP-S790";
const String AUTHOR="Joe Foley <foley@ru.is>";
const String SVN_REVISION="$Rev$";
const String SVN_URL="$URL$";
const String SVN_ID="$Id$";
/* Code written by Joe Foley <foley@ru.is> on 2014-01-14
*
* Requires libraries:
@@ -24,12 +25,16 @@ int pinGND=4; // Longer leg on the IR LED
int pinLED=13; // The heartbeat LED on the board
int secs;
int heartbeat=0;
int heartbeat_state=0;
string INST_NAME="<Installation Name>";
string ARTIST="<Artist>";
string YEAR="<Year>";
int playtime= 1*60+1; // set here your DVD title playtime in sec leave a little extra
String INST_NAME="Trajectories";
String ARTIST="Sigurdur Gudjonsson (video) & Anna Thorvaldsdottir (sound)";
String YEAR="2014";
int videotime = 14*60+44; // set here your DVD title playtime in sec
int choptime = 3; // how much to chop at the end if the videos are
// not exactly the same length
int playtime = videotime - choptime;
int resetdelay = 3; // seconds from reset to playing from beginning
IRsend irsend;
@@ -43,11 +48,11 @@ void setup() {
Serial.begin(115200);
setTime(23,15,16,1,14,14); // set time to 23:15:16 Jan 14 2014
Serial << DESCRIPTION << REVISION << endl;
Serial << DESCRIPTION << " " << SVN_REVISION << endl;
Serial << "Code by " << AUTHOR << endl;
Serial << "For \""<< INST_NAME << "\" by "<< ARTIST <<"(" << YEAR << ")" << endl;
Serial << URL << endl << ID << endl;;
Serial << "Playtime: " << endl;
Serial << SVN_URL << endl << SVN_ID << endl;
Serial << "Playtime: " << playtime << endl;
secs=playtime;
showtime();
@@ -56,36 +61,36 @@ void setup() {
/********************************************************************/
void loop() {
heartbeat()
heartbeat();
}
void heartbeat() {
if (heartbeat == 1) {
if (heartbeat_state == 1) {
digitalWrite(pinLED, HIGH);
heartbeat = 0;
heartbeat_state = 0;
}
else {
digitalWrite(pinLED, LOW);
heartbeat = 1;
heartbeat_state = 1;
}
Alarm.delay(1000);
}
void sync() {
Serial << "Sync" << endl;
// The DVD player starts playing automatically, so we should pause it
send_pause();
waitsec(2);
waitsec(resetdelay);
send_previous();
// on this model, previous immediately starts playing
for(int t = 0; t < playtime; t++) {
/* 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.
showtime();
}
*/
}
/**************************************************************/