I am building a replica of the 2016 Mercedes F1 car steering wheel. The wheel has nine rotary encoders which are used to adjust things like engine braking and hybrid settings.
The problem is that games only allow such settings to be increased one increment at a time. There is no way to set, say, position 6 to 60% hybrid recovery. Thus, I need a way to take the input from a hexidecimal 16 position rotary switch and convert it into a single button press.
When the switch is moved from one position to another, a button press must be activated. However, when it is moved in the opposite direction from one position to another then a different button needs to be pressed. Essentially, I need to compare the value from the switch from one cycle to the next.
Is there a way to do this?
Is there a way to do this?
Yes. All you need to do is keep track of what the switch state was last time.
Are you using a rotary switch or a rotary encoder? You are using the terms interchangeably but they are different devices.