gswg wroteRotary encoder - there are loads of examples on the web and I've placed code (source and pre-compiled) on github.com/iqaudio/tools
just connect the three legs of the encoder to gpio23, ground (normally the middle pin of the rotary encoder) and gpio24, and run the pre-compiled code (IQ_rot) with root privileges from the Pi's terminal and you should be good to go.
PM me if you need an encoder and are in the UK - I may have one lying around somewhere.
Gordon
Hi Gordon, I'm trying to get a rotary encoder running and am not having any luck running your compiled code.
1. Connected rotary encoder to IO23, IO24, 0V pins on the Pi-DAC, powered up the Pi.
2. Grabbed your files
git clone https://github.com/iqaudio/tools.git
3. Run IQ_rot
[root@runeaudio tools]# sudo IQ_rot&
[1] 854
[root@runeaudio tools]# -bash: sudo: command not found
[1]+ Exit 127 sudo IQ_rot
4. Tried running this way instead:
[root@runeaudio tools]# ./IQ_rot
./IQ_rot: error while loading shared libraries: libwiringPi.so: cannot open shared object file: No such file or directory
5. Grabbed wiringPi via git clone, try to build:
[root@runeaudio wiringPi]# ./build
wiringPi Build script
=====================
WiringPi Library
./build: line 53: sudo: command not found
./build: line 59: make: command not found
Make Failed...
Please check the messages and fix any problems. If you're still stuck,
then please email all the output and as many details as you can to
projects@drogon.net
It seems to do with using sudo on RuneAudio, but I don't have the knowledge on what else to try or change. Can you point me in the right direction?