Closed kelltob closed 7 years ago
Hi @kelltob , the script is really only designed for Raspbian. Although it will work for others in some cases it will need some adjustments. Your output shows that the ALSA devices on the JustBoom Player are slightly different than what you'd find on Rasbian. For the JustBoom Player we are developing a dedicated plugin for the rotary encoder so stay tuned.
In the meantime you could try changing a line in class EasyMixer from self.mixer = alsaaudio.Mixer('Digital') to self.mixer = alsaaudio.Mixer(control='Digital', cardindex=1)
this should fix the problem for the time being.
The last commit deb3621 should have fixed the script to run on both the JustBoom Player and other Raspbian OSs. I have also fixed the installation package dependencies. Let me know how this goes.
Script starts without any problem and sets volume to 0 but turning the rotary encoder doesn't change anything. Same with the Button.
Which pins did you use to connect things? The ones you mentioned above (16/18/10/25/39)? Can you show me the board with the connections you made? Maybe use something like https://unsee.cc/
Yes I used 16/18/10/25/39 https://unsee.cc/sapeditu/ https://unsee.cc/tezuposi/ https://unsee.cc/natisoru/
I could only see the last one as the others timed out already. Can you send me a link for that rotary encoder? Is that the type the requires one pin connected to VCC?
Its a KY-040 similar to this http://amzn.eu/d6qyKsO
I connected the VCC pin to ground because in the script the gpio pins are pulled up. The VCC pin is only for the button and i think it doesn't matter. I also tried with the VCC connected to this pin but changed nothing.
That kind of rotary is not compatible with our code, it works under a slightly different principle. Have a look here to see what changes with that encoder https://www.modmypi.com/blog/how-to-use-a-rotary-encoder-with-the-raspberry-pi You need to use one like this https://www.pi-supply.com/product/rotary-encoder-push-switch/
Also those pins don't seem to be the right ones, have a look here https://pinout.xyz/pinout/amp_zero and maybe just start with the rotary without the button.
Ohh you're right. Muting works now. I will try again when I've got a new rotary. Thanks for help
NP let us know how that goes
I Installed the script on my Raspi Zero W + JustBoom Amp Zero + JustBoom Player 1.041 via SSH (logged in as JustBoom) and disabled the UART. Wired the Rotary Encoder to pins 16/18/10/25/39.
Nothing happend when I turned the rotary encoder so I tried to run the scrip after installing python-alsaaudio with
python /opt/justboom/jb-rotary.py
and got this message:
Traceback (most recent call last): File "jb-rotary.py", line 154, in <module> easy_mixer = EasyMixer(start_volume,volume_increments, int(rotary_pins[0]), int(rotary_pins[1]), button_pin) # New mixer instantiation File "jb-rotary.py", line 64, in __init__ self.mixer = alsaaudio.Mixer('Digital') alsaaudio.ALSAAudioError: Unable to find mixer control 'Digital',0
Any ideas what I do wrong? sndrpiboomberry isn't default. Is this a problem?
justboom@justboom:~$ cat /proc/asound/cards 0 [ALSA ]: bcm2835 - bcm2835 ALSA bcm2835 ALSA 1 [sndrpiboomberry]: snd_rpi_boomber - snd_rpi_boomberry_dac snd_rpi_boomberry_dac