Permalink
Browse files

2 files

  • Loading branch information...
rsmoz committed Dec 7, 2012
1 parent a1ae16a commit b520b0b2edec9cc5e19c74fd16f6169d38983748
Showing with 9 additions and 17 deletions.
  1. +9 −17 rawirdecode.pde
View
26 rawirdecode.pde 100644 → 100755
@@ -1,4 +1,3 @@
-
/* Raw IR decoder sketch!
This sketch/program uses the Arduno and a PNA4602 to
@@ -90,22 +89,15 @@ void printpulses(void) {
// print it in a 'array' format
Serial.println("int IRsignal[] = {");
- Serial.println("// ON, OFF ");
+ Serial.println("// ON, OFF (in 10's of microseconds)");
for (uint8_t i = 0; i < currentpulse-1; i++) {
- //Serial.print("\t"); // tab
- Serial.print("pulseIR(");
- Serial.print(pulses[i][1] * RESOLUTION , DEC);
- Serial.print(");");
- Serial.println("");
- //Serial.print("\t");
- Serial.print("delayMicroseconds(");
- Serial.print(pulses[i+1][0] * RESOLUTION , DEC);
- Serial.println(");");
-
+ Serial.print("\t"); // tab
+ Serial.print(pulses[i][1] * RESOLUTION / 10, DEC);
+ Serial.print(", ");
+ Serial.print(pulses[i+1][0] * RESOLUTION / 10, DEC);
+ Serial.println(",");
}
- //Serial.print("\t"); // tab
- Serial.print("pulseIR(");
- Serial.print(pulses[currentpulse-1][1] * RESOLUTION, DEC);
- Serial.print(");");
-
+ Serial.print("\t"); // tab
+ Serial.print(pulses[currentpulse-1][1] * RESOLUTION / 10, DEC);
+ Serial.print(", 0};");
}

0 comments on commit b520b0b

Please sign in to comment.