I forgot that Arduino cannot handle dashes in file names. This is really rather silly.

This commit is contained in:
foley@ru.is
2014-01-14 23:36:25 +00:00
parent c07b8de5aa
commit 06693a54ff

View File

@@ -18,6 +18,8 @@ const string SVNID="$Id$";
#include <IRremote.h>
#include <Streaming.h>
#include <Time.h>
#include <TimeAlarms.h>
int pinGND=4; // Longer leg on the IR LED
int pinLED=13; // The heartbeat LED on the board
@@ -39,6 +41,7 @@ void setup() {
pinMode(pinGND,OUTPUT);
pinMode(pinLED,OUTPUT);
Serial.begin(115200);
setTime(23,15,16,1,14,14); // set time to 23:15:16 Jan 14 2014
Serial << DESCRIPTION << REVISION << endl;
Serial << "Code by " << AUTHOR << endl;
@@ -47,12 +50,28 @@ void setup() {
Serial << "Playtime: " << endl;
secs=playtime;
showtime();
secs=playtime;
Alarm.timerRepeat(playtime, sync);
}
/********************************************************************/
void loop() {
heartbeat()
}
void heartbeat() {
if (heartbeat == 1) {
digitalWrite(pinLED, HIGH);
heartbeat = 0;
}
else {
digitalWrite(pinLED, LOW);
heartbeat = 1;
}
Alarm.delay(1000);
}
void sync() {
Serial << "Sync" << endl;
// The DVD player starts playing automatically, so we should pause it
send_pause();
@@ -67,23 +86,12 @@ void loop() {
// The most critical is having everything start at the
// same time.
showtime();
if (heartbeat == 1) {
digitalWrite(pinLED, HIGH);
heartbeat = 0;
}
else {
digitalWrite(pinLED, LOW);
heartbeat = 1;
}
delay(1000);
}
}
/**************************************************************/
void waitsec(int sec) {
Serial << "Wait " << sec << " seconds" << endl;
delay(sec*1000);
Alarm.delay(sec*1000);
}