Go Down

Topic: IRAnalyzer output (Read 1 time) previous topic - next topic


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:.

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:
Code: [Select]
TCCR1B = 0x03;          // 16MHz clock with prescaler means TCNT1 increments every 4uS

And the times 4 multiplication in this line:
Code: [Select]
time = (long) TimerValue[change_count] * 4;


Sorry, ignore my question.  Just had a re-think with a straight brain and now realise that each increment in the time variable that is output represents a microsecond, not 16 as I first thought. Was getting my division vs multiplication mixed up.  The code makes complete sense to me now as well.

Go Up