paul- wrote: 
> This tool is well suited for buttons and encoders integrated for use
> with PCP and LMS.
> 
> https://forums.slimdevices.com/showthread.php?107001-ANNOUNCE-SqueezeButtonPi-Tool-to-use-buttons-and-rotary-encoders-on-a-RPi

Thanks for your hint. I cloned and compiled the tool.

The play/pause command works well, but no rotary detection.

$ sudo ./sbpd -v e,5,6,VOLM,0 b,13,PLAY
1622059289.5066 6 sbpd.c,282: Options parsing: Set verbose mode
1622059289.5084 6 sbpd.c,471: Using builtin button configuration
1622059289.5098 6 control.c,81: Adding Command PLAY: Fragment ["pause"]
1622059289.5130 6 control.c,81: Adding Command VOL+: Fragment
["button","volup"]
1622059289.5155 6 control.c,81: Adding Command VOL-: Fragment
["button","voldown"]
1622059289.5156 6 control.c,81: Adding Command PREV: Fragment
["button","rew"]
1622059289.5157 6 control.c,81: Adding Command NEXT: Fragment
["button","fwd"]
1622059289.5158 6 control.c,81: Adding Command POWR: Fragment
["button","power"]
1622059289.5159 6 GPIO.c,253: Initializing GPIO
1622059289.5425 6 control.c,193: Button defined: Pin 13, BCM Resistor:
up, Short Type: LMS, Short Fragment: ["pause"] , Long Type: unused, Long
Fragment: (null), Long Press Time: 3000
1622059289.5443 6 discovery.c,381: MAC address found: b8:27:eb:11:a7:8f
1622059289.5458 6 servercomm.c,176: Initializing CURL
1622059289.5746 6 sbpd.c,237: Starting main loop polling
1622059289.5770 6 discovery.c,234: Found server 18B2A8C0. A new address
1622059289.6806 6 discovery.c,345: discovery packet: port: 9000, name:
raspberrypi, uuid: 7cbcc969-55ff-4037-8d46-85412234273e
1622059289.6809 6 discovery.c,130: Squeezebox control port found: 9000
1622059289.6810 6 discovery.c,149: Server address found: 192.168.178.24
1622059293.8349 6 GPIO.c,102: Short PRESS: 178
1622059293.8351 6 control.c,107: Button CB set for button #:0, gpio pin
13
1622059293.8896 6 control.c,217: Button pressed: Pin: 13, Press
Type:Short
1622059293.8898 6 servercomm.c,74: Send Command:0, Fragment:["pause"]

The pins are correct as this python code detects the rotary:
https://github.com/conradstorz/KY040

with:
CLOCKPIN = 5
DATAPIN = 6
SWITCHPIN = 13


------------------------------------------------------------------------
andreas99's Profile: http://forums.slimdevices.com/member.php?userid=70311
View this thread: http://forums.slimdevices.com/showthread.php?t=113512

_______________________________________________
unix mailing list
unix@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/unix

Reply via email to