Arduino PXX

openTx has introduced a range of new features, ideas and bling. It is fast becoming the firmware of choice for many users. openTx will run on ALL current hardware platforms, including the gruvin9x and sky9x boards. Work has already started to support the new FrSky X9D radio!
Post Reply
BiggieMcDubs
Posts: 3
Joined: Wed Jan 04, 2017 1:55 pm
Country: -

Arduino PXX

Post by BiggieMcDubs »

I have kind of a weird request, but OpenTX is the only project that I have seen that actually sends PXX.

I'm looking to do the same with an Arduino Nano. I've adapted (probably terribly) the code from OpenTX but the XJT that I'm sending it to, doesn't respond at all to the signal.

Can anyone help with this? I know there was a thread a while back discussing the protocol, and I'm guessing the implementation came from those discussions.

https://github.com/MichaelCWarren/PPMtoPXXArduino

It appears to generate all of the correct bytes, but there are a few things I'm unsure of.

1. The RX number
2. Using a serial port to send the data, is that the correct way? Is there another way?

I'm kind of an Arduino rookie, so any help would be greatly appreciated.

Thanks!

User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Arduino PXX

Post by MikeB »

er9x/ersky9x also support the PXX protocol.
The PXX protocol is synchronous, so using an asynchronous serial port will not work.
You will need to use it synchronous with a bit time of 8uS. Check the code for using the SCC on the SKY/AR9X/9XR-PRO boards. This operates synchronously.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
BiggieMcDubs
Posts: 3
Joined: Wed Jan 04, 2017 1:55 pm
Country: -

Re: Arduino PXX

Post by BiggieMcDubs »

Oh, I see that now. Thanks! Another example surely helps. I think I got the bitstream working correctly, and I can set the transmitter in bind mode, but I have a question about channel values. Is it correct that in each "transmission"(every 9ms) only half of the channels get passed?

I made some code changes this morning fixing some of this (I haven't actually run this new code), I understand you're probably busy, but do you think you could look over my code and see if I'm doing anything really stupid?

Thanks very much for your help.
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Arduino PXX

Post by MikeB »

Yes, 8 channels sent at a time. If you only need 8 channels, you don't need to send channels 9-16.
Note that on the Taranis, there is a hardware inverter between the processor pin and the module pin.
If you post your code (put it in a zip file), I'll see if I can find time to look at it.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
BiggieMcDubs
Posts: 3
Joined: Wed Jan 04, 2017 1:55 pm
Country: -

Re: Arduino PXX

Post by BiggieMcDubs »

I got it working!

Thanks for your help!

Nikolas
Posts: 2
Joined: Mon Feb 20, 2017 11:49 pm
Country: -

Re: Arduino PXX

Post by Nikolas »

Hi there,
I'm really interested on how is your progress on you Arduino pxx code? Would love to try it out
Nikolas
Posts: 2
Joined: Mon Feb 20, 2017 11:49 pm
Country: -

Re: Arduino PXX

Post by Nikolas »

are the cppm and pxx library on your GitHub from er9x src? Do you know how exactly pxx controls mode change on the module? I'm trying to understand stuff with no luck so far..
potatofarmer123
Posts: 1
Joined: Thu Jun 22, 2017 8:15 pm
Country: -

Re: Arduino PXX

Post by potatofarmer123 »

Would it be possible for you to post a copy of this code? I'm very interested in interfacing an Arduino with a XJR module and am having trouble getting started.

Thank you!

Post Reply

Return to “openTx”