I now have 6 capacitive touch buttons that work with this command:
sbpd -v b,20,POWR,0,1 b,5,PLAY,0,1 b,6,PREV,0,1 b,12,NEXT,0,1 b,13,VOL+,0,1 b,16,VOL-,0,1
Except that the VOL+ and VOL- buttons don't control the volume:
1665655871.6666 6 control.c,134: Button CB set for button #:5, gpio pin 16
1665655871.7481 6 control.c,276: Button pressed: Pin: 16, Press Type:Short
1665655871.7481 6 servercomm.c,74: Send Command:0, Fragment:["button","voldown"]
1665655876.2441 6 GPIO.c,107: Short PRESS: 84
1665655876.2442 6 control.c,134: Button CB set for button #:4, gpio pin 13
1665655876.2596 6 control.c,276: Button pressed: Pin: 13, Press Type:Short
1665655876.2597 6 servercomm.c,74: Send Command:0, Fragment:["button","volup"]
1665655876.8027 6 GPIO.c,107: Short PRESS: 2477
1665655876.8028 6 control.c,134: Button CB set for button #:5, gpio pin 16
1665655876.8686 6 control.c,276: Button pressed: Pin: 16, Press Type:Short
1665655876.8687 6 servercomm.c,74: Send Command:0, Fragment:["button","voldown"]
1665655878.1881 6 GPIO.c,107: Short PRESS: 936
1665655878.1882 6 control.c,134: Button CB set for button #:5, gpio pin 16
1665655878.2767 6 control.c,276: Button pressed: Pin: 16, Press Type:Short
1665655878.2768 6 servercomm.c,74: Send Command:0, Fragment:["button","voldown"]
Announcement
Collapse
No announcement yet.
[ANNOUNCE] SqueezeButtonPi - Tool to use buttons and rotary encoders on a RPi
Collapse
X
-
Its not required anymore. Just download the extension pcp-sbpd.tcz that will install everything you need.
Leave a comment:
-
Hello,
how to install wiringPi, required to use SqueezeButtonPi?
I cannot find it in picoreplayer extensions
Leave a comment:
-
I have problem using rotary encoder for volume control.
Using sbpd -s e,16,20,VOLU,2
And commands for bittons. Buttons works. But envoder dont, i can see events in console. But volume is not chamging, in console i see -1 count then +1 count.
I tried changing VOLU to key event, but then also if turn left volume down occurs and after immediately volume up occurs so net reault volume always 100%
Leave a comment:
-
That is for sure not possible. You will need to write your own software.
Leave a comment:
-
Originally posted by paul- View PostYou can do short press / long press.
But I actually found a way how to do it. I dont know if it is intended to work like that but it works.
I just double assigned the button like this
Code:sbpd -f /home/tc/sbpd_commands.cfg b,4,SHUF,2,0 b,4,PRE1,2,0
Code:SHUF=["playlist","shuffle","1"]
Another thing I want to do is to control a GPIO depending on the play state. Is there a easy way to do it?
Leave a comment:
-
start multiple commands with one button
Hey,
Is there a way to start more than one command when I press a button?
I have a playlist that is started when I press a button and it should always start in shuffle mode.
So im looking for something like this:
PRE1=["playlist","shuffle","1"]["button","preset_1.single"]
but it is not working
These single commands work just fine
PRE1=["playlist","shuffle","1"]
PRE1=["button","preset_1.single"]
Any idea how to solve the problem?
Thanks
Leave a comment:
-
Originally posted by hsmeets View PostJust read the posts before yours, it was just discussed.
#!/bin/sh
Before the script?
I appologize but I am a total noob...
I just can log in to SSH.
Someone wrote something about creating a startup.sh file?
How, where? what do i write?
I have read all the pages for three days now, nothing about what to write or where...
I just run the script posted and changed the pin-numbers and got that working - now i just need to make it permanent
Edit, this is how my terminal looks like:
Edit 2: Solved - I added this text under the GUI tweaks User command: sudo pigpiod -t 0 -f -l -s 10; sleep 1.0; sbpd -f /home/tc/sbpd_commands.cfg e,27,24,VOLU,2 b,22,PLAY,2,0
And that worked...
Leave a comment:
-
It works! - How do i make it permanent?
Hi all - first post and i love this thing!
Complete noob but is learning
Pi 3B+
5" LCD HDMI waveshare
rotary encoder
480GB SSD
Picoreplayer - latest version
LMS, jivelite etc..
So, everything is working amazing!
I have installed pcp_sbpd.tcz via the web GUI.
The encoder is hooked up and i SSH in to terminal and run this:
Code:#start pigpiod daemon sudo pigpiod -t 0 -f -l -s 10 # wait for pigpiod to initialize - indicated by 'pigs t' exit code of zero count=10 # approx time limit in seconds while ! pigs t >/dev/null 2>&1 ; do if [ $((count--)) -le 0 ]; then printf "\npigpiod failed to initialize within time limit\n" exit 1 # or however you want to deal with failure fi # printf "\nWaiting for pigpiod to initialize\n" sleep 1 done printf "\npigpiod is running\n" # load uinput module - required to be able to send keystrokes # then set the permission to group writable, so you don't need to run sbpd with sudo modprobe uinput sudo chmod g+w /dev/uinput # issue the sbpd command sbpd -f /home/tc/sbpd_commands.cfg e,27,24,VOLU,2 b,22,PLAY,2,0
But how do imake it permanent?
Leave a comment:
-
Originally posted by PaulH View PostFor "autorun":
Code:./sbpd-script.sh
Code:/home/tc/sbpd-script.sh
Leave a comment:
-
Originally posted by chill View PostAh, that's an evil Linux trap for the unwary Windows user! It won't assume that you are referring to a file in the current directory. You have to be explicit:
Code:[email protected]:~$ [email protected]:~$ ./sbpd-script.sh
For "autorun":
Code:./sbpd-script.sh
Last edited by PaulH; 2022-01-23, 19:41.
Leave a comment:
-
Originally posted by PaulH View PostI can't run it:
Code:[email protected]:~$ [email protected]:~$ sbpd-script.sh -sh: sbpd-script.sh: not found
Code:[email protected]:~$ [email protected]:~$ ./sbpd-script.sh
Leave a comment:
Leave a comment: