Jul 242013
 
NYC Resistor

NYC Resistor (Photo credit: Wikipedia)

A follow up – this topic isn’t dead after all! Au contraire mon ami, I actually got the thing working!

After my first attempt and failure, I reached out to the fine people of NYC Resistor‘s Microcontrollers listserve asking for help. They were super helpful and offered a variety of suggestions on what the problem could be. You can read the entire thread here: https://groups.google.com/forum/#!topic/nycresistormicrocontrollers/x3Dl-ssQMzU

What it boiled down to was that the loop inside of the pulseIR() function stipulates in the comments that “38 kHz is about 13 microseconds high and 13 microseconds low”, and after experimenting with some timings I realized that the calls to digitalWrite() were taking longer than the proposed “3 microseconds”. I lowered the value of hangoutTime from 10 down to 7 and voila, it works! It was as simple as that one change! I modified the gist accordingly, and now I’m in business!

Thanks again NYCR!

Enhanced by Zemanta