PPMReader icon indicating copy to clipboard operation
PPMReader copied to clipboard

Arduino running F_CPU ≠ 8MHz does not work with Timer1

Open dev-endy opened this issue 5 years ago • 0 comments

First of all, great library! It got my small Syma S107 heli in the air using a "normal" remote control providing PPM signals. I converted the PPM into infrared signals that the heli could recieve.

However, when I tried to improve accuracy by using Timer1 I could not get any PPM signals with ppmReader.get() anymore. The reason was because my Nano v3 ran on 16MHz. After changing counter = TCNT1 * CPU_SPEED_MULTIPLIER; into counter = TCNT1 / CPU_SPEED_MULTIPLIER; it worked like a charm. Maybe you could include the fix in the next release.

Cheers!

dev-endy avatar Apr 24 '20 17:04 dev-endy