Program a rotary potentiometer (P1) as switch

ersky9xr is the port of the er9x firmware to the 9XRPRO radio.
Post Reply
udo187
Posts: 7
Joined: Sun May 10, 2015 5:37 pm
Country: -

Program a rotary potentiometer (P1) as switch

Post by udo187 »

Hello!

I have flashed my 9xr pro with the superb er9x-firmware.
Now I have a question: Is it possible to program a rotary potentiometer (P1) as switch with only three values?
For example when the potentiometer is turned completely left the value should be -100, in the middle position there should be the value zero and completely right the value should be 100. But no values between this three positions.
I have tried this with an curve but there are also some other values when i rotate the potentiometer.

Thanks for any help!

Udo

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

Re: Program a rotary potentiometer (P1) as switch

Post by jhsa »

You need to use the logical switches to detect the 3 positions. For example using 3 logical switches:

L1 v<val P1 -98 (This detects when the pot is fully left)
L2 v~=val P1 0 (This detects the center)
L3 v>val P1 +98 ( And this detects when the pot is fully right)

Use L1, L2 and L3 in the mixer as the switch positions.

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
udo187
Posts: 7
Joined: Sun May 10, 2015 5:37 pm
Country: -

Re: Program a rotary potentiometer (P1) as switch

Post by udo187 »

Hello João!

Thank you it works fine!
I love my 9xr with Er9x and this forum!

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

Re: Program a rotary potentiometer (P1) as switch

Post by jhsa »

:) :)
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: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Program a rotary potentiometer (P1) as switch

Post by MikeB »

This could be done with the new (only in test version) curve17 where you can move the x as well as the y values.
Set curve 17 to:
-100 -100
-66 -100
-33 -100
-33 0
0 0
33 0
33 100
66 100
100 100

You will have -100 out with the pot between -100 and -33, 0 out with the pot between -33 and +33 and +100 out with the pot between +33 and +100.

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

udo187
Posts: 7
Joined: Sun May 10, 2015 5:37 pm
Country: -

Re: Program a rotary potentiometer (P1) as switch

Post by udo187 »

@MikeB: That sounds good!
Where can I find this test version and when will it change to final version?

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

Re: Program a rotary potentiometer (P1) as switch

Post by MikeB »

Test versions are found here: viewtopic.php?f=7&t=4676.
Usually they are fully working although the new feature(s) being tested may have some slight problems.

Mike.
erskyTx/er9x developer
The difficult we do immediately,
The impossible takes a little longer!
idar66
Posts: 38
Joined: Tue Aug 19, 2014 8:12 am
Country: New Zealand

Re: Program a rotary potentiometer (P1) as switch

Post by idar66 »

MikeB wrote:Test versions are found here: viewtopic.php?f=7&t=4676.
Usually they are fully working although the new feature(s) being tested may have some slight problems.

Mike.
hi mike if i upgrade to the lastest test version will i still have the same bluetooth features etc that i have now this is the version i was going to upgrade too, ersky9xProvR218j.zip . also am i reading that you can use a standard pot as a six postion switch is this correct and if it is how do i go about setting it up, thanks idar :D :D
User avatar
MikeB
9x Developer
Posts: 17990
Joined: Tue Dec 27, 2011 1:24 pm
Country: -
Location: Poole, Dorset, UK

Re: Program a rotary potentiometer (P1) as switch

Post by MikeB »

Yes, the bluetooth is all still working.
For the 6-position switch, please read this thread: viewtopic.php?f=122&t=8267.

Note: You don't need to use variable resistors. You may use, say, 5 1K resistors in series, then tap off at power, the 4 junctions, ground.

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

Post Reply

Return to “ersky9xr”