adjusted the code to start with a pause, shorter delays, then do previous
This commit is contained in:
@@ -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);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user