I’m just starting out with Arduino and have some project ideas around using IR remote control (which certainly appears to be a bit of a minefield). I’m using the IRAnalyzer.pde sketch from the playground to capture the output from my aircon remote control unit. I haven’t made any material modifications to the code so haven’t bothered to re-paste it, but here is the link:.
http://arduino.cc/playground/Code/InfraredReceivers
It’s working well, it certainly seems to be recording the on/off sequence of the transmitting remote. My query is around interpreting the output of the sketch, which consists of a time stamp and the transition (0->1 or 1->0). Am I correct in thinking that each increment in the time stamp (time) variable represents 16 microseconds?
My rationale being as follows, comments is this line:
TCCR1B = 0x03; // 16MHz clock with prescaler means TCNT1 increments every 4uS
And the times 4 multiplication in this line:
time = (long) TimerValue[change_count] * 4;