Pushbutton as ON/OFF switch?

More
27 Apr 2016 19:15 #47324 by SirDomsen
Pushbutton as ON/OFF switch? was created by SirDomsen
Hi,
could anyone please tell me how to configure a Pushbutton as on/off switch? The pushbutton is connected via an Arduino and the signal is PPM5 (-100 when not pushed, 100 when pushed). I want the (virtual?) channel to toggle between -100 and 100 everytime the button is pushed.

Any help appreciated!

Thanks in advance

SirDomsen

Please Log in or Create an account to join the conversation.

More
28 Apr 2016 11:33 #47356 by RoGuE_StreaK
Replied by RoGuE_StreaK on topic Pushbutton as ON/OFF switch?
Sorry can't think of what would give that result, I've been contemplating but my brain isn't egaging. I'd be interested in seeing a method too, as it could be useful for multiple things.
Can't remember if maybe the "sticky throttle hold" had some sort of latching mechanism based on curves interacting with each other?

I know the trims have a latching method, but that's inbuilt behind the scenes, not sure what PB did to achieve that.

Please Log in or Create an account to join the conversation.

More
28 Apr 2016 13:15 #47362 by Cereal_Killer
Replied by Cereal_Killer on topic Pushbutton as ON/OFF switch?
I love the Arduino add-on method but in your case I wouldn't bother, as Rogue streak mentions it's very easy to do using the trims and a virtual Channel.
What I just got done doing on my 10 was wiring physical momentary switches in to be electrically the same as the trim switches so I could place them at my fingertips on the right and left shoulders.

This way there's no messing with an Arduino, no taking up the PPM in and out capability of your radio and the setup couldn't be easier.

Go into thr trims menu and you'll see all the options for momentary / latching.

Taranis X9E | DEVO 10 | Devo U7E | Taranis Q7

What I do in real life: rivergoequestrian.com/

Please Log in or Create an account to join the conversation.

More
28 Apr 2016 13:47 #47364 by SirDomsen
Replied by SirDomsen on topic Pushbutton as ON/OFF switch?
Thank you both. Of course I know about the method of using a trim momentary. I tried to configure it like that - but had no luck so far.

Is it possible that it is impossible? :blink:

Please Log in or Create an account to join the conversation.

More
28 Apr 2016 17:59 #47379 by PhracturedBlue
Replied by PhracturedBlue on topic Pushbutton as ON/OFF switch?
trim buttons are not handled the same as a channel, and there is no automated support for what you are asking. however, it should be possible using a couple virtual channels I think.
you'd want to setup your momentary button as a switch on virt1 which gets a value of !virt2 when the buttonis NOT pressed
then setup virt2 such that it gets the value of virt1 when the button is pressed.
you probably want a max/min waveform on virt1 (and maybe virt2 as well)

that should work as follows:
assuming virt1 is initially -100 and virt2 is initially -100
button is normally -100, so virt1 = !virt2, so virt1= +100, virt2=-100
the button is pressed so virt2 = virt1, virt2 is now +100. virt1 is unaffected
button is released, so virt1 = !virt2, so virt1 is now -100

That is completely untested, but I think it will work.

Please Log in or Create an account to join the conversation.

More
28 Apr 2016 18:27 #47382 by SirDomsen
Replied by SirDomsen on topic Pushbutton as ON/OFF switch?
Oh! Just as you tell that, I vaguely remember that you did something like that for demonstrating the delay mixer.

Will try it soon, thanks!

Your "thinking" usually is the truth ;)

Please Log in or Create an account to join the conversation.

Time to create page: 0.036 seconds
Powered by Kunena Forum