Dear all,
after your support to solve my Mono-Downmix problem, I have now another
challenge to finalize my Squeezebox-Radio-Clone.
The following sh-script is working well but I am only able to increase
the volume by +10 once a second when I constantly press the wired
hardware button.
For the play/stop button this is no issue but to control the volume
quickly, this is too slow.
I found some similar scripts on other websites but I wondering if others
face the same problem or if there is a way to improve (maybe by
establishing a telnet connection to the LMS server before the while loop
- but I am struggling to code this).
Thanks for your thoughts!
Nick
p.s. Background info: I have a PI2 connected via cable, so WLAN does not
have any impact on the performance.
Code:
--------------------
#!/bin/sh
sudo chown tc /sys/class/gpio/export
echo "27" > /sys/class/gpio/export
sudo chown tc /sys/class/gpio/gpio27/direction
sudo chown tc /sys/class/gpio/gpio27/value
echo "in" > /sys/class/gpio/gpio27/direction
while true; do
value=$(cat /sys/class/gpio/gpio27/value)
# if [ $wert = "1" ]; then
#
# echo "Value is 1 - no button was pressed"
#
# fi
if [ $value = "0" ]; then
echo "b8:27:eb:db:65:f3 mixer volume +5" | nc -i 1 debianserver 9090
echo "Value is 0 - Button was pressed"
fi
done
--------------------
------------------------------------------------------------------------
Nick L.'s Profile: http://forums.slimdevices.com/member.php?userid=57284
View this thread: http://forums.slimdevices.com/showthread.php?t=105508
_______________________________________________
unix mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/unix