raphaelyancey / pyKY040

🎛 High-level Python interface for the KY040 rotary encoder
https://pypi.org/project/pyky040/
GNU General Public License v3.0
26 stars 16 forks source link

Custom step start #10

Closed Leo-Aqua closed 1 year ago

Leo-Aqua commented 2 years ago

Try adding a start=0 to the encoder setup, so that it starts at 0 and if you turn the encoder ti negtive values it gets to -1

felixholfelder commented 5 months ago

Hello, I am also facing the problem that I can not set a start value for the encoder. This is what my encoder looks like: rotary = pyky040.Encoder(CLK=CLK_PIN, DT=DT_PIN, SW=SW_PIN)

And my setup function: rotary.setup(start=50, scale_min=MIN_VOLUME, scale_max=MAX_VOLUME, step=VOLUME_STEP, inc_callback=update_sound, dec_callback=update_sound, sw_callback=toggle_mute)

I am controlling the system sound with the encoder. I expect to start the encoder at value 50. But it starts at 0.