MattTeensy
Member
I am trying to configure a Teensy 3.6 to use with flysky FS-T6 for PPM. the receiver is powered from the 5v pin on an Arduino.
I have tried using attachInterrupt, attachInterruptVector. I also tried using the PPM libraries and configuring interrupts through the registers. Also tried running the sketch on Windows and Linux laptops. The methods above have also been tried on multiple pins.
All the results I am getting are not correct.
below is the simplest routine I used to measure the pulses from the receiver.
All the data from the methods above look similar to the data attached. Could someone help me understand? is it something really obvious? I am really out of ideas...View attachment PulseLength.txt
I have tried using attachInterrupt, attachInterruptVector. I also tried using the PPM libraries and configuring interrupts through the registers. Also tried running the sketch on Windows and Linux laptops. The methods above have also been tried on multiple pins.
All the results I am getting are not correct.
below is the simplest routine I used to measure the pulses from the receiver.
Code:
unsigned long timer_Roll;
uint16_t roll_Reciever_Pulse;
void setup() {
Serial.begin(9600);
pinMode(24,INPUT);
attachInterrupt(24,interrupt,CHANGE);
}
void loop() {
}
void interrupt(){
if(digitalReadFast(24) == 1){
timer_Roll = micros();
}
else if(digitalReadFast(24) == 0){
roll_Reciever_Pulse = micros() - timer_Roll;
Serial.println(roll_Reciever_Pulse);
}
}
All the data from the methods above look similar to the data attached. Could someone help me understand? is it something really obvious? I am really out of ideas...View attachment PulseLength.txt
Last edited: