Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 2 of 2

Thread: Editing PPM Library in Teensyduino

  1. #1
    Junior Member
    Join Date
    Feb 2021
    Utah, USA

    Editing PPM Library in Teensyduino

    Hi All,

    Summary of current problem:
    I am trying to send a PPM signal from a Teensy 4.0 to a Pixhawk4 flight controller using the PulsePosition Library included in the teensyduino install. I am outputting a PPM signal (checked with an arduino mega), but the pixhawk does not recognize it.

    What I've found so far:
    This may be due to line ~66 in the PulsePosition.cpp
    #define TX_PULSE_ WIDTH 100
    (I want to change it to 300). []

    I am not sure if I am editing the PulsePosition.cpp that teensyduino is actually running. I downloaded just the PulsePosition library from github [] separately and edited those files, but I believe teensyduino already had the library downloaded/ installed so it may still be running those original files.

    How do I find/edit the libraries inherent to the teensyduino installation? (just on my personal PC - I am running windows and have the teensyduino application downloaded in 'Downloads')

    Is there something else that may be going wrong or any other suggestions that could help with the initial problem? This is difficult to reproduce without a pixhawk but I appreciate the help!

    Thank you so much for your help!
    *Note- first time posting on this forum so I welcome any advice, suggestions, links to other threads I haven't found yet, or even 'don't do it like that ever' *

    Code: (disclaimer - half of this is also reading in a PPM signal [working perfectly] so that part can be ignored)
    #include <PulsePosition.h>
    PulsePositionInput DLRXinput(FALLING);
    PulsePositionOutput PXHKoutput(FALLING);
    void setup() {
      DLRXinput.begin(6); //signal from DL must be connected to pin 6
      PXHKoutput.begin(10); //signal to Pxhwk must be coming from pin 10 
      Serial.print("Setup Complete\n");
    void loop() {
      // read in the PWM channels from the DL
      int chAil =;
      int chElev =;
      int chThr =;
      int chRudd =;
      // print out PWM signals to verify working correctly
      // send channels directly through to the pixhawk 
      // test purely the PPM output (not using read in signals)
    Picture of wiring setup (both receiver & pixhawk connected w/ ground, voltage, and signal wires):
    Click image for larger version. 

Name:	Setup.PNG 
Views:	39 
Size:	471.8 KB 
ID:	23743
    Last edited by snow121; 02-19-2021 at 04:29 PM. Reason: included picture of setup

  2. #2
    Junior Member
    Join Date
    Feb 2021
    Utah, USA
    Update: followed directions in this thread ( and verified that it is using the correct library (ie: I did successfully change that parameter). So now I'm really not sure what the issue is...

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts