Decode PPM Sum signal and recode in PPM Sum signal ????

Status
Not open for further replies.

sv650s

Member
Hi,
I have never used Teensy, but there is maybe the solution for my problem with arduino Nano who is no enough powerfull/quickly i think...

I would like to put the wire of RX receveir PPM Sum (all channels are in the same signal) on one pin (witch one ?) on the teensy and i would like to decode this signal and get the values for each channel (i will need to modify them by later) and after i would like to recode all this values in only one signal PPM Sum an output it on another pin of the teensy (witch one ?)
So :
- witch teensy i must buy ?
- witch libraries ?
- need to use interrupt ? Timer ?
- my RX receiver works under 5v is it a problem for the teensy
- have you got samples of what i want to make ?

Thanks for your help
 
Last edited:
Hi PaulStoffregen,
i have my program who run on arduino nano and using the timer of arduino, if this program will work on Teensy 3.1 or i will must write again the program for this platform ?
best regards
 
It depends on the specifics of the code, which you didn't attach to your message (see the "forum rule").

But based on the various PPM code I've seen floating around various websites for normal Arduino, it almost always uses Timer1 and sometimes pin change interrupts. That sort of direct AVR access won't work on Teensy 3.1.

However, the PulsePosition library is very easy to use. It's far simpler, and much more accurate, than all the AVR code I've seen. The library does all the hard work and gives you high accuracy results with easy available() and read() functions.
 
Thanks for this example
But this one only decode/code 1 channel...
In my project i need to decode ppm sum (8 channels on the same input) and stock this values in an array and after code this 8 channels into only 1 channel and output it in another pin of teensy
 
But this one only decode/code 1 channel...

No, you have misunderstood. It can decode up to 16 channels encoded on the same input.

See this line:

Code:
 num = myIn.available();

If your PPM stream has 8 channels, "num" will be equal to 8 after each frame of data is received.

The library can also transmit up to 16 channels on a stream, at the same time. You can use it to process up to 8 streams simultaneously, with up to 16 channels on each.
 
Ok, thanks for explanation
And it´s the same for encoding then ?
But where are stored the values ? It is possible to store them in an array ?
And other thing, what is the meaning of this :
myOut.write(1, 600.03);
myOut.write(2, 1500);
myOut.write(3, 759.24);
// slots 4 and 5 will default to 1ms
myOut.write(6, 1234.56);

And why it´s write to connect together pin 5 and 6 ???
 
It is possible to store them in an array ?

Yes, of course you can store the values into an array. All you have to do is add a small amount of code to put the data into your array.

And why it´s write to connect together pin 5 and 6 ???

To run the demo on a Teensy without any other hardware, for testing.

I hope you can understand this library, and Teensy in general, is about DIY electronics. The library does all the hard work of receiving and transmitting PPM. But you still have to build your own application to use it. That part is not provided for you. You must write some code to use the data in the way you need.
 
I understand, i know i will must write my code
But it´s just i'm curious, because i'm affraid to not understand the method to program teensy
I understand the method on arduino
 
because i'm affraid to not understand the method to program teensy
I understand the method on arduino

Teensy and Arduino programming is nearly identical. You write code in the Arduino software, then click Upload. Sometimes you add Serial.print(variable) and open the Serial Monitor window.
 
Hey Paul!

The PulseLocation library is awesome! However, I'm having trouble understanding it.

Here's what I've been working on.

What're you trying to do?
I'm trying to read PWM inputs in the serial monitor and then sum them into a PPM signal and pass them out from one of the digital pins.
I'm feeding the Spektrum Satellite Receiver into the AR6210.
Here's what it looks like: lg-908754-0-7175.jpg

I'm reading the outputs from the Throttle, Aileron, ELEV, Rudder, Gear and AUX1.
So why don't you read the PPM signal directly from the Receiver?
I tried that on my teensy, but I couldn't get it to work with my code (not until I saw your Library).

So for the input do I do:
Code:
void setup()
{
 myInput.begin(2);
 if ( myInput.available() )
   {
   for( int i=0; i < 6; i++)
    {
     myInput.read(rcValue[i]);
    }
}

Also, how do I write myOutput.write(channel 1-6, 1500) into one pin?
 
Status
Not open for further replies.
Back
Top