Originally posted by jeroen2
View Post
thank you verry much!!
i also try to make it work with a rotary encoder (as gpiokey) that emulates the arrow keys of a keyboard without success (and its very logical since a rotary encoader gives pulse A and B even if you turn it clockwise or anti clockwise
so with a reaserch i found this
Code:
Name: rotary-encoder Info: Overlay for GPIO connected rotary encoder. Load: dtoverlay=rotary-encoder,<param>=<val> Params: pin_a GPIO connected to rotary encoder channel A (default 4). pin_b GPIO connected to rotary encoder channel B (default 17). relative_axis register a relative axis rather than an absolute one. Relative axis will only generate +1/-1 events on the input device, hence no steps need to be passed. linux_axis the input subsystem axis to map to this rotary encoder. Defaults to 0 (ABS_X / REL_X) rollover Automatic rollover when the rotary value becomes greater than the specified steps or smaller than 0. For absolute axis only. steps-per-period Number of steps (stable states) per period. The values have the following meaning: 1: Full-period mode (default) 2: Half-period mode 4: Quarter-period mode steps Number of steps in a full turnaround of the encoder. Only relevant for absolute axis. Defaults to 24 which is a typical value for such devices. wakeup Boolean, rotary encoder can wake up the system. encoding String, the method used to encode steps. Supported are "gray" (the default and more common) and "binary".
Code:
dtoverlay=rotary-encoder,rotary0_2_a=keycode=103
thank you again vasilios
Leave a comment: