This library provides decoding of PPM pulse edges into PPM frames. It does not require a particular interrupt handling or input pin measurement strategy. All the user needs to provide is the relative timing of pulses, and the library will extract PPM frames from that.
PPM channel values are encoded as the gap between multiple pulses. Typically PPM pulses are high values and the gaps between them are low values; however, some PPM receivers invert the signal, where the PPM signal is pulled high and pulses are low values. PPM frames consist of multiple channels encoded in this way, with a longer duration gap between the last channel and the first channel, after which comes the next frame. This frame-separating gap is referred to as a frame sync or reset. So a PPM frame with five channels might look like:
||||||___ Where high values are the pulses and low values are the gaps between pulses. The pulse duration itself is typically tuned to be as short as possible and still reliably transmitted.
The library provides defaults for common configuration values such as:
- Minimum PPM channel value (the minimum gap between pulses)
- Maximum PPM channel value (the maximum gap between pulses)
- Minimum frame sync duration (the minimum time for a gap between pulses to be considered a frame sync / reset)
- Minimum number of PPM channels to be considered a valid frame.
Configuration values for PpmParser
A single group of PPM channel values
Default maximum channel value
Maximum PPM channels this library supports
Default midpoint channel value
Default minimum channel value
Default minimum number of channels per frame
Default minimum gap between frames (no pulses / inactive/ sync)
Base type for PPM timing Your clock for measuring pulse edges will need at least microsecond resolution.
PPM timing values