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
(I want to change it to 300). [https://discuss.ardupilot.org/t/solved-teensy-ppm-via-pulse-position-library-to-pixhawk/37930/7]
Issue:
I am not sure if I am editing the PulsePosition.cpp that teensyduino is actually running. I downloaded just the PulsePosition library from github [https://github.com/PaulStoffregen/PulsePosition] separately and edited those files, but I believe teensyduino already had the library downloaded/ installed so it may still be running those original files.
Question:
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')
Alternatively:
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)
Picture of wiring setup (both receiver & pixhawk connected w/ ground, voltage, and signal wires):
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
Code:
#define TX_PULSE_ WIDTH 100
Issue:
I am not sure if I am editing the PulsePosition.cpp that teensyduino is actually running. I downloaded just the PulsePosition library from github [https://github.com/PaulStoffregen/PulsePosition] separately and edited those files, but I believe teensyduino already had the library downloaded/ installed so it may still be running those original files.
Question:
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')
Alternatively:
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)
Code:
#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 = DLRXinput.read(1);
int chElev = DLRXinput.read(2);
int chThr = DLRXinput.read(3);
int chRudd = DLRXinput.read(4);
// print out PWM signals to verify working correctly
Serial.print(chAil);Serial.print("\t");
Serial.print(chElev);Serial.print("\t");
Serial.print(chThr);Serial.print("\t");
Serial.print(chRudd);Serial.print("\n");
// send channels directly through to the pixhawk
//PXHKoutput.write(1,chAil);
//PXHKoutput.write(2,chElev);
//PXHKoutput.write(3,chThr);
//PXHKoutput.write(4,chRudd);
// test purely the PPM output (not using read in signals)
PXHKoutput.write(1,1200);
delay(100);
PXHKoutput.write(1,1700);
}
Picture of wiring setup (both receiver & pixhawk connected w/ ground, voltage, and signal wires):
Last edited: