-
Notifications
You must be signed in to change notification settings - Fork 0
Audio RotaryKnobVolume
Caution
This page is outdated and will be removed in the future. Neccessary information have been integrated into https://github.com/MiczFlor/RPi-Jukebox-RFID/blob/master/components/gpio_control/README.md.
Taken from the Phoniebox@GitHub issues forum
- Tested with this rotary know hardware
- One file in the repo is dedicated to this feature:
- RPi-Jukebox-RFID/components/gpio_control/GPIODevices/rotary_encoder.py
- See below in this document for info on how to change the direction of the rotary knob
(capacitors are optionally)
Tested version: Used 3.3V Pin on Raspberry Pi. Connected everything without Capacitors.
.---------------. .---------------.
| | | |
| CLK |------o---------------| GPIO 5 |
| | | | |
| DT |------)----o----------| GPIO 6 |
| | | | | |
| SW | | | | |
| | | | | |
| + |------)----)----------| 3.3V |
| | | | | |
| GND |------)----)----------| GND |
| | | | | |
'---------------' | | '---------------'
KY-040 | | Raspberry
| |
--- ---
100nF --- --- 100nF
| |
| |
| |
=== ===
GND GND
Once you've got the hardware done, start the configuration:
You need to edit settings/gpio_buttons.ini
.
After editing the config file, restart the service:
sudo systemctl restart phoniebox-gpio-control
The scripts now also provide support for a second knob to navigate through the tracks of a folder. Please not that you may use the switch also for other functionality. See the pin out page for details.
If you want to swap clockwise and counter clockwise, you can edit the code. This is the original:
def rotaryChangeCWVol(steps):
check_call("./scripts/playout_controls.sh -c=**volumeup** -v="+str(steps), shell=True)
def rotaryChangeCCWVol(steps):
check_call("./scripts/playout_controls.sh -c=**volumedown** -v="+str(steps), shell=True)
And this is the version with the behaviour in the opposite direction:
def rotaryChangeCWVol(steps):
check_call("./scripts/playout_controls.sh -c=**volumedown** -v="+str(steps), shell=True)
def rotaryChangeCCWVol(steps):
check_call("./scripts/playout_controls.sh -c=**volumeup** -v="+str(steps), shell=True)
If you like Phoniebox, consider: buy me a coffee or PayPal
- Code: https://github.com/MiczFlor/RPi-Jukebox-RFID
- Phoniebox home page: English | Deutsch
Phoniebox is a contactless jukebox for the Raspberry Pi, playing audio files, playlists, podcasts, web streams and spotify triggered by RFID cards. All plug and play via USB, no soldering iron needed. Update: if you must, it now also features a howto for adding GPIO buttons controls.
Visit Phoniebox.de
π₯ Version 3
- β Releases
- π΅ Install Jukebox Version 3
- π Report a bug
- π Propose a feature
- βοΈ Feature Status
- π Documentation
- π©βπ» Development
- βοΈ Contributing
- π¦ Code
πΆ Version 2
- β Releases
- π΅ Install Jukebox Version 2
- π Report a bug
- βοΈ Features
- π Documentation
- βοΈ Contributing
- π¦ Code
Version 2 Pages
-
Setup / Upgrades
- Synchronising Phonieboxes in a local network
- Smart Home remote control with MQTT
- Hardware Pinout Overview
- Systemwide Equalizer
- Phoniebox with read-only Filesystem
- HiFiBerry Soundcard Details
- WM8960 Hi-Fi HAT
- PAM8403 Amplifier Power Off
- TPA3118 Amplifier Power Off and EMI improvement
- External Non USB Audio DAC ES9023, PCM5102, etc.
- On-board LEDs with fibre optics
- Setting GPIOs at boot time
- Stop on removal with USB RFID Reader
- Firmware update improves audio out
- Architecture