+ 5

Avoiding jumping in the value

We receive a value from Potentiometer Encoder, lets' call it valuePot; We also have a tkinter slider value which we can change it by moving let's call it valueSlider; So, when we change the value of slider by moving it and the new try to move Potentiomter valuePot starts from zero, but valuePot must start from where valueSlider is; How to do it?

28th Jun 2019, 6:12 AM
Zhenis Otarbay
Zhenis Otarbay - avatar
2 Réponses
+ 3
Offset the value you get from the Encoder with the value of valueSlider: valuePot = valueSlider + <value_from_Potentiometer>
5th Jul 2019, 1:34 PM
Aryaman Srivastav
Aryaman Srivastav - avatar
+ 6
Aryaman Srivastav nice try, we could do it thanks
5th Jul 2019, 11:16 PM
Zhenis Otarbay
Zhenis Otarbay - avatar