Code: Select all
dtoverlay=rotary-encoder,pin_a=5,pin_b=6,steps-per-period=4,relative_axis,linux_axis=8
dtoverlay=rotary-encoder,pin_a=5,pin_b=6,steps-per-period=4,linux_axis=8,relative_axis
dtoverlay=rotary-encoder,pin_a=5,pin_b=6,linux_axis=8,relative_axis,steps-per-period=4
Code: Select all
raspberrypi3:/boot# evtest /dev/input/by-path/platform-5.rotary-event
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0
Input device name: "5.rotary"
Supported events:
Event type 0 (EV_SYN)
Event type 2 (EV_REL)
Event code 0 (REL_X)
Properties:
Testing ... (interrupt to exit)
Code: Select all
raspberrypi3:~# evtest /dev/input/by-path/platform-5.rotary-event
evtest: No such file or directory
raspberrypi3:~# evtest /dev/input/by-path/platform-5.rotary-event-joystick
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x0 product 0x0 version 0x0
Input device name: "5.rotary"
Supported events:
Event type 0 (EV_SYN)
Event type 3 (EV_ABS)
Event code 8 (ABS_WHEEL)
Value 0
Min 0
Max 24
Flat 1
Properties:
Testing ... (interrupt to exit)
If I had to, I could connect to the encoder over I2C to reconfigure it for full period mode on startup, but changing steps-per-period in the dtoverlay seems much easier and more straightforward.
Can I configure these long dtoverlay settings on multiple lines? If so, how do I tell it the settings for each encoder? (when I hook up the second one, it will have a different set of pin_a & pin_b, different axis, etc., although I'm not sure yet if the second encoder will need a different steps-per-period)
Or, can I change something to have it recognize longer dtoverlay lines? (I'm building with Yocto and have already had to tweak the kernel a bit, so I could add another patch to tweak this if it's possible)