Using Trn Swith to turn P3 on

Programing help and example for all firmwares based on thus's th9 firmware.
Post Reply
raserdk
Posts: 13
Joined: Sat Jan 17, 2015 12:39 pm
Country: -

Using Trn Swith to turn P3 on

Post by raserdk »

ok i want to use my trn swith to turn on P3 For my gimbal for Roll and when i press it again to use P3 to control Yaw and press again to turn off

it starts with off
klik it one time activate p3 to control roll
klik 2 times to activate p3 to control Yaw
klik 3 times to turn off,
or something like that, is that possible :)


edit. i am using a turnigy 9x with mikes Firmware v817

User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Using Trn Swith to turn P3 on

Post by jhsa »

Try this on this post from Mike:

viewtopic.php?f=5&t=2&start=2160#p93297

It will give you 4 combinations. A different one every time you flick the trainer switch. You need 3 only so you will have to click once more to return to the beginning.

You will need to detect the first 3 positions.. Both switches OFF, and either of them ON.
So, from the link:

L1 F-Flop TRN !L1
L2 F-Flop !L1 !L2

The above will give you 4 different possibilities.
Now to detect them with some more logical switches.

L3 AND !L1 !L2 - Use L3 in the mixer for OFF
L4 AND L1 !L2 - Use L4 in the mixer to activate P3 to roll
L5 AND L2 !L1 - Use L5 in the mixer to activate P3 to yaw
L6 AND L1 L2 - Use L6 in the mixer to control whatever else you want, or just don't use it..

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
raserdk
Posts: 13
Joined: Sat Jan 17, 2015 12:39 pm
Country: -

Re: Using Trn Swith to turn P3 on

Post by raserdk »

awsome thanks man, i just set the switches in for l4 and l5 inside the P3 in their respective channels :)
but i did have to move my alarms down to figure it out ;) i could use L6 to control pitch on my gimbal


Youtube video of it working
Last edited by raserdk on Sun Mar 01, 2015 7:51 pm, edited 1 time in total.
User avatar
jhsa
Posts: 19480
Joined: Tue Dec 27, 2011 5:13 pm
Country: Germany

Re: Using Trn Swith to turn P3 on

Post by jhsa »

Great.. Keep monitoring the thread from the link above as Mike has been developing a feature that could do the job even better.. Increasing/decreasing GVARs. Hopefully that will fit on the 9x radio.

João
My er9x/Ersky9x/eepskye Video Tutorials
https://www.youtube.com/playlist?list=PL5uJhoD7sAKidZmkhMpYpp_qcuIqJXhb9

Donate to Er9x/Ersky9x:
https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=YHX43JR3J7XGW
User avatar
MikeB
9x Developer
Posts: 17993
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Using Trn Swith to turn P3 on

Post by MikeB »

If nothing else, the L1L2 type increment and clear are already in the er9x code.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!

liew416
Posts: 2
Joined: Wed Dec 17, 2014 8:43 am
Country: -

Re: Using Trn Swith to turn P3 on

Post by liew416 »

That is awesome idea !

Post Reply

Return to “er9x / gruvin9x / th9 based firmwares”