Hoping someone can help me with getting my FlySky FS-T6 receiver working with the Teensy 3.2. I successfully am receiving the four receiver channels using pulseIn, but that takes too much clock time. I can run Paul's PulsePosition example just fine. But when I try to use the PulsePosition example and replace the Pin 9 to Pin 10 wire with channel three (throttle) into Pin 10 I get no signal. The num value (where num = myIn.available() just reads 0).
Here's the code. Again, in summary:
1) I can use the pulseIn command to read all four channels, but it's horribly slow.
2) So I decided to switch to Paul's PulsePosition library. The example (code below) ran fine with Pins 9 and 10 connected.
3) But when I remove the Pin 9 to Pin 10 wire, and place any of the receiver lines into Pin 10, I get nothing. In fact, num shows as 0, like it's not able to pick up the signal. Unfortunately I do not have a scope.
#include <Wire.h>
#include <Servo.h>
#include <PulsePosition.h>
PulsePositionOutput myOut;
PulsePositionInput myIn;
void setup(){
Serial.begin(9600);
myOut.begin(9);
myIn.begin(10);
myOut.write(1, 600.0);
//myOut.write(2, 1500.0);
//myOut.write(3, 759.24);
//myOut.write(6, 1234.56);
}
int count=0;
void loop(){
int i, num;
num = myIn.available();
//Serial.println(num);
if(num>0){
count = count + 1;
Serial.print(count);
Serial.print(" : ");
for(i=1; i <= num; i++){
float val = myIn.read(i);
Serial.print(val);
Serial.print(" ");
}
Serial.println();
}
}
Could it be a signal power level issue, where maybe pulseIn reads a HIGH at a lower voltage? I'm powering the receiver from the Teensy, which is 3.3v not 5v like it would be with an Arduino Uno. Doesn't seem to make sense that puleIn would grab the receiver signal but not PulsePosition. Thanks!!
Here's the code. Again, in summary:
1) I can use the pulseIn command to read all four channels, but it's horribly slow.
2) So I decided to switch to Paul's PulsePosition library. The example (code below) ran fine with Pins 9 and 10 connected.
3) But when I remove the Pin 9 to Pin 10 wire, and place any of the receiver lines into Pin 10, I get nothing. In fact, num shows as 0, like it's not able to pick up the signal. Unfortunately I do not have a scope.
#include <Wire.h>
#include <Servo.h>
#include <PulsePosition.h>
PulsePositionOutput myOut;
PulsePositionInput myIn;
void setup(){
Serial.begin(9600);
myOut.begin(9);
myIn.begin(10);
myOut.write(1, 600.0);
//myOut.write(2, 1500.0);
//myOut.write(3, 759.24);
//myOut.write(6, 1234.56);
}
int count=0;
void loop(){
int i, num;
num = myIn.available();
//Serial.println(num);
if(num>0){
count = count + 1;
Serial.print(count);
Serial.print(" : ");
for(i=1; i <= num; i++){
float val = myIn.read(i);
Serial.print(val);
Serial.print(" ");
}
Serial.println();
}
}
Could it be a signal power level issue, where maybe pulseIn reads a HIGH at a lower voltage? I'm powering the receiver from the Teensy, which is 3.3v not 5v like it would be with an Arduino Uno. Doesn't seem to make sense that puleIn would grab the receiver signal but not PulsePosition. Thanks!!
Last edited: