Browse files

fine tuning done, works well, now need sensor for when apple tv turns on

  • Loading branch information...
1 parent 0de0c61 commit ce6a814715c1537e8c52238740c89a561f4e2db5 @wcombs committed May 2, 2012
Showing with 8 additions and 5 deletions.
  1. +8 −5 intervalometer/intervalometer.ino
View
13 intervalometer/intervalometer.ino
@@ -17,15 +17,14 @@ void setup() {
void loop() {
if (digitalRead(buttonPin)) {
- Serial.println("Sending IR signal");
-
SendLGTVCodeOn();
- delay(500);
+ delay(6*1000);
+ // send one more just in case it was already on
+ SendLGTVCodeOn();
+ delay(1000);
sendHDMIon();
delay(1000);
SendHDMIsel2();
-
- //delay(5*1000); // wait 5 seconds
}
}
@@ -123,6 +122,7 @@ void SendLGTVCodeOn() {
delayMicroseconds(2200);
pulseIR(540);
delayMicroseconds(28620);
+ //Serial.println("done lg power");
}
void SendHDMIsel1() {
@@ -199,6 +199,7 @@ void SendHDMIsel1() {
pulseIR(560);
delayMicroseconds(28864);
pulseIR(8860);
+ //Serial.println("done hdmi switch 1");
}
void SendHDMIsel2() {
@@ -279,6 +280,7 @@ void SendHDMIsel2() {
pulseIR(8860);
delayMicroseconds(2180);
pulseIR(560);
+ //Serial.println("done hdmi switch 2");
}
void sendHDMIon() {
@@ -359,4 +361,5 @@ void sendHDMIon() {
pulseIR(560);
delayMicroseconds(28864);
pulseIR(8820);
+ //Serial.println("done hdmi power");
}

0 comments on commit ce6a814

Please sign in to comment.