DigiAmp+ RPi3 Dietpi Adding Rotary Encoder Help Needed!

So, after tons of googling and emails back and forth with Gordon, I have volume control working. Here is how I did it.

1: Log in to dietpi, go to dietpi-software then Software Additional and select Wiringpi, Alsa, Git, and MC, select OK then go to Install and install the selected options.

2: reboot and log back in to dietpi

3: run ‘git clone https://github.com/iqaudio/tools.git’

4: run ‘sudo apt-get install libasound2’

5: run ‘sudo apt-get install libasound2-dev’

6: from the root@DietPi:~# prompt, type ‘mc’ and enter to launch Midnight Commander, double click on /tools and then double click on IQ_rot.c
Come down the page to line 40: #define TRUE 1 and add // at the start of the line, making it //#define TRUE 1
Now do the same for line 41: #define FALSE 0 to //#define FALSE 0
Exit and save

7: from the root@DietPi:~# prompt, type ‘cd tools’ and enter then ‘gcc IQ_rot.c -oIQ_rot -lwiringPi -lasound’ and enter. This should return you to the dietpi prompt with no errors.

8: from the root@DietPi:~# prompt, type ‘sudo /root/tools/IQ_rot&’ and enter and you should get the reply
root@DietPi:~# IQaudIO.com Pi-DAC Volume Control support Rotary Encoder) v1.5 Aug 30th 2015

The rotary encoder should now be working :slight_smile:

9: To make it load the required files after every reboot, create a cron job with ‘@reboot /root/tools/IQ_rot&’ using ‘sudo VISUAL=nano crontab -e’

Hope this may be of help to others!

Val