jamesgkent / rotary_volume Goto Github PK
View Code? Open in Web Editor NEWkernel module to use rotary encoder as a volume control
License: GNU General Public License v2.0
kernel module to use rotary encoder as a volume control
License: GNU General Public License v2.0
All new 2019.05-1 install. Kernel 4.14.78-4-osmc.
I followed the instructions. what is wrong?
sudo make
make -C /lib/modules/4.14.78-4-osmc/build M= modules
make[1]: Entering directory '/usr/src/rbp2-headers-4.14.78-4-osmc'
make[2]: *** No rule to make target 'arch/arm/tools/syscall.tbl', needed by 'arch/arm/include/generated/uapi/asm/unistd-common.h'. Stop.
arch/arm/Makefile:319: recipe for target 'archheaders' failed
make[1]: *** [archheaders] Error 2
make[1]: Leaving directory '/usr/src/rbp2-headers-4.14.78-4-osmc'
makefile:3: recipe for target 'all' failed
make: *** [all] Error 2
Because steps-per-period=2 or 4 did not work for me so I added:
Use steps-per-period=1
and
on line 22:
static int multiple_key = 3; // minimum is 1
on line 41:
int ii;
And added a for loop:
for (ii=0; ii<multiple_key; ii++) {
send_key( (inc > 0) ? KEY_VOLUMEUP : KEY_VOLUMEDOWN);
}
Ignore the below, appears to be related to the number of steps. Currently need a half turn of the knob to get one event on volume_up or _down. Leaving the issue up but closed for posterity.
Thanks.
~~Hi, not really an 'issue', more a documentation/user problem. I'm attempting to use this to control the volume on my rasPi zero, and having followed the steps listed to install your driver. I now have 2 entries in my evtest list ~~
Available devices:
/dev/input/event0: Rotary Encoder Volume
/dev/input/event1: rotary@4
Monitoring Rotary Encoder Volume yields no events while turning the knob, but rotary@4 shows my encoder working. What am I missing to tie the events generated by rotary@4 to the key events listed under Rotary Encoder Volume?
I had previously enabled a rotary encoder on its own prior to finding your repo, would I need to remove/undo any previous rotary encoder assertions? So far I've removed the original /boot/config.txt encoder entry and replaced it with a paste of yours (& moved pins to match on my pi). Any assistance appreciated.
Can you advise if the same workaround that's required for Kodi would be required for Mopidy on a Pi running Raspbian Stretch? I see the correct events firing in evtest, but no change in effective or reported volume. Sound is output to bluetooth speaker via Alsa.
*Edit: alsamixer accurately reflects volume changes, but only to the default output, not the bluetooth output. "alsamixer -D bluealsa" displays the output volume for the correct device, but it remains static while the default device changes. Any advice on how to get it to affect the bluetooth / bluealsa sink instead would be appreciated.
Hi,
the most common rotary-encoder KY-040 support also button-press. Could you add this functionality to your code as well? It works great!
Best,
Henning
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.