#Generic Fuel Selector but using a rotary encoder (Potentiometer)

1 messages · Page 1 of 1 (latest)

surreal granite
#

Hi guys and girls, I am trying to code a rotary pot to use as a Fuel Selector in my Bristell B23 Sim. The values are as follows:
Greater than 920 = (>K:FUEL_SELECTOR_OFF)
Between 450 and 675 = (>K:FUEL_SELECTOR_RIGHT)
Less than 120 = (>K:FUEL_SELECTOR_LEFT)

Could anyone advise me the best way to achieve this please...

small mortar
#

what is the actual range obtained from the potentiometer?

#

does it have to be exactly those ranges (I would think those are kind of arbitrarily set by you)?

surreal granite
#

Hi Jamie... So the values I have taken from where the actual fuel selector stops at each point i.e. OFF LEFT RIGHT

#

and then a little each side...

small mortar
#

you have stops on a potentiometer?

surreal granite
#

I'm using an actual FUEL selector

#

Originally I was using a 4 pos switch but the 'stops' were not in the correct place...

small mortar
#

Try this code

@ s0 120 < if{ (>K:FUEL_SELECTOR_LEFT) quit }
450 675 l0 rng if{ (>K:FUEL_SELECTOR_RIGHT) quit }
l0 920 > if{ (>K:FUEL_SELECTOR_OFF) }
surreal granite
#

OK... give me a few minutes to test and I'll get back to you...

#

and thanks for the help advise so far!

small mortar
#

I changed the code, I had copied the wrong events.

#

I assumed you know those events are the correct ones

surreal granite
#

Yes definitely... the Bristell uses the generic FUEL selector codes....

#

OK so I had to move the hardware and the values have changed.... so I need to check them again but I think you may have 'saved the day' 👍

small mortar
#

Changing the range values should be easy

surreal granite
#

Amazing. Thanks so much amigo!

#

It works perfectly Jamie! Brilliant!