jeroen2 wrote: 
> I was having a hard time getting that to work as well.. Ended up up
> adding the following to config.txt and that works fine.. 
> > 
Code:
--------------------
  >   > dtoverlay=gpio-key,gpio=5,keycode=16 # KEY_q power
  > dtoverlay=gpio-key,gpio=6,keycode=57 # KEY_SPACE play-pause
  > dtoverlay=gpio-key,gpio=16,keycode=48 # KEY_b jump-forward
--------------------
> > 

hi jeroen2 this works preety well and easy without downloading anything
simple and awesome!!! 

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".
  
--------------------
 

i try this comand 

Code:
--------------------
    dtoverlay=rotary-encoder,rotary0_2_a=keycode=103
--------------------


but it does not work , i would be gratefull if anyone tell me how to
make the encoder emulates the up-down arrows of the keyboard 

thank you again vasilios


------------------------------------------------------------------------
billtsig's Profile: http://forums.slimdevices.com/member.php?userid=71096
View this thread: http://forums.slimdevices.com/showthread.php?t=107001

_______________________________________________
diy mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/diy

Reply via email to