in a previous post I briefly showed how to read the sum signal of a receiver that is able to output the signal. Although the code works quite well there are several issues with the code:
pulseIn(SignalPin, HIGH)blocks until the corresponding pin is set to
HIGH, which is a major waste of time, because no other calculations can be performed in the meantime
- I noticed that every now and then the readings start to glitch causing unwanted noise
To cope with the first issue I used Arduino's external interrupt feature that calls a callback function for every rising edge. In addition I wrapped it in a class and defined it as a library for easy usage.
[update: 2013-07-28][update: 2013-08-02]