adjusted the code to start with a pause, shorter delays, then do previous

This commit is contained in:
foley@ru.is
2013-09-10 20:23:58 +00:00
parent 099521a160
commit f4b296f7ea

View File

@@ -51,7 +51,7 @@ void setup() {
send_pause(); send_pause();
waitsec(1); waitsec(1);
send_pause(); send_pause();
waitsec(2); waitsec(1);
secs=playtime; secs=playtime;
} }
@@ -59,8 +59,10 @@ void setup() {
/********************************************************************/ /********************************************************************/
void loop() { void loop() {
Serial.println("Sync"); Serial.println("Sync");
send_play(); send_previous();
waitsec(3);
send_play();
for(int t = 0; t < playtime; t++) { for(int t = 0; t < playtime; t++) {
// This will not give us perfect 1 second timing // This will not give us perfect 1 second timing
// but it is good enough for most video applications // but it is good enough for most video applications
@@ -80,10 +82,8 @@ void loop() {
waitsec(1); waitsec(1);
send_pause(); send_pause();
waitsec(2); waitsec(1);
send_previous();
waitsec(5);
} }
/**************************************************************/ /**************************************************************/
@@ -121,4 +121,4 @@ void send_previous() {
// First comes the pre-data bits, then the command code // First comes the pre-data bits, then the command code
Serial.println(" previous"); Serial.println(" previous");
irsend.sendNEC(0xA25DC43B, 32); irsend.sendNEC(0xA25DC43B, 32);
} }