Home of the Squeezebox™ & Transporter® network music players.
Page 8 of 11 FirstFirst ... 678910 ... LastLast
Results 71 to 80 of 103
  1. #71
    Senior Member
    Join Date
    Nov 2016
    Posts
    145
    Quote Originally Posted by ralphy View Post
    Please don't hijack this thread.

    Post in the thread where I announced support for the wav35skin.
    Uuups - this is where I meant to post it, sorry. This happens when there are too many threads opened in too many browser tabs.
    Can you move it or shall I repost?
    Regards
    Martin
    PCP (always latest version) on RasPi 3 with PhatDac (player & server)
    PCP on several RasPis 2 +3
    2 Airplay speakers (Sony SA-NS510) integrated via Airplay Bridge Plugin

  2. #72
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    560
    Quote Originally Posted by cubii View Post
    so this evening i tried to use more than one butoon, but if i use this code:

    /usr/local/sbin/sbpd -d -s e,23,24,VOLM,0 b,12,NEXT b,16,PLAY

    Both button will do the same? (both are working, Connected to BCM 12 and BCM16 and ground)

    What is wrong?
    Was the reason for this ever found? I am seeing the same sort of behaviour. I have a rotary encoder with a push-button function, and that all works fine as volume controller and a play/pause button if I use this command line:
    Code:
    /usr/local/sbin/sbpd -d -s e,23,24,VOLM,2 b,17,PLAY,2
    But if I add another button I get odd behaviour. With this command line:
    Code:
    /usr/local/sbin/sbpd -d -s e,23,24,VOLM,2 b,17,PLAY,2 b,4,POWR,2
    I get nothing from the encoder, and both buttons power down the player. (EDIT - I just tried this again, and the encoder works this time. Odd. But neither button seems to power up the player, whereas with e,23,24,VOLM,2 b,17,POWR,2 the button successfully powers up the player again)

    With this command line:
    Code:
    /usr/local/sbin/sbpd -d -s e,23,24,VOLM,2 b,17,PLAY,2 b,4,PREV,2
    I get a working encoder again, but both buttons do the same PREV action.

    I've also seen situations where I get a kind of 'half PREV', in that the current track restarts, rather than moving to the previous track in the playlist. I'm having great difficulty getting any sort of consistency.

    I'm using pCP 3.5.0 and I'm following these steps:
    Code:
    pcp bu  # save pcp config
    
    cd /mnt/mmcblk0p2/tce/optional
    
    wget http://downloads.sourceforge.net/project/picoreplayer/beta/sbpd.tcz.md5.txt
    
    wget http://downloads.sourceforge.net/project/picoreplayer/beta/sbpd.tcz
    
    md5sum sbpd.tcz # make sure the file downloaded correctly
    f0157164d10b86325b38fee0cb8d709e  sbpd.tcz
    
    cat sbpd.tcz.md5.txt # does it match the line above?
    f0157164d10b86325b38fee0cb8d709e  sbpd.tcz
    
    echo "sbpd.tcz" >> /mnt/mmcblk0p2/tce/onboot.lst
    
    pcp rb  # you must reboot!
    Last edited by chill; 2018-04-07 at 08:38.

  3. #73
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    1,165
    There is a newer version in pCP

    pcp_sbpd.tcz

    Just use the extension page to download it (remove the old one). That version has a button debounce in it.....give it a try.

    Otherwise I've been working on cleaning up the button commands to allow for short and long presses, as well as launching a script from a button.

    https://github.com/paul-1/SqueezeBut...Button-Presses I know I've defined multiple buttons in this version.....
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://sites.google.com/site/picoreplayer/home

    Please donate if you like the piCorePlayer

  4. #74
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    560
    Thanks Paul - I hadn't even looked in the Extensions section before!

    I think I did it correctly, but I still have the same problem. But maybe I didn't do it properly.

    Noob alert! How do I remove the old version? I removed sbpd from /usr/local/sbin, and I removed sbpd.tcz.md5.txt and sbpd.tcz from /mnt/mmcblk0p2/tce/optional for good measure. I also edited /mnt/mmcblk0p2/tce/onboot.lst to remove the sbpd line.

    Then I installed pcp_sbpd from the piCorePlayer sourceforge repository. Was there anything else I needed to do to clear out the old version? Is there a way to check which version I'm now running?

    Anyway, with the command '/usr/local/sbin/sbpd -d -s e,23,24,VOLM,2 b,17,PLAY,2 b,4,POWR,2', the result is that both buttons still power down the player, and neither powers it back up. With just 'e,23,24,VOLM,2 b,4,POWR,2' the power button powers down and back up as expected.

  5. #75
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    1,165
    Quote Originally Posted by chill View Post
    Thanks Paul - I hadn't even looked in the Extensions section before!

    I think I did it correctly, but I still have the same problem. But maybe I didn't do it properly.

    Noob alert! How do I remove the old version? I removed sbpd from /usr/local/sbin, and I removed sbpd.tcz.md5.txt and sbpd.tcz from /mnt/mmcblk0p2/tce/optional for good measure. I also edited /mnt/mmcblk0p2/tce/onboot.lst to remove the sbpd line.

    Then I installed pcp_sbpd from the piCorePlayer sourceforge repository. Was there anything else I needed to do to clear out the old version? Is there a way to check which version I'm now running?

    Anyway, with the command '/usr/local/sbin/sbpd -d -s e,23,24,VOLM,2 b,17,PLAY,2 b,4,POWR,2', the result is that both buttons still power down the player, and neither powers it back up. With just 'e,23,24,VOLM,2 b,4,POWR,2' the power button powers down and back up as expected.
    You did that correctly.....Let me fully test the new version that I've been working on, then I'll push it to pippen.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://sites.google.com/site/picoreplayer/home

    Please donate if you like the piCorePlayer

  6. #76
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    560
    Thank you. Just for completeness, in addition to the rotary-encoder-with-push-button, I've wired up a number of simple push buttons, and I can get any one of them to do any of the programmed functions on any of the free GPIO pins, but whenever I try to programme two buttons it goes wrong.




  7. #77
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    1,165
    Chill,

    We have an updated version ready. You can update by just running pcp-update pcp-sbpd.tcz

    run sbpd --help to take a look at the command line changes for buttons. (The encoder stuff should not have changed)


    PS. Why are you using the 5v power rail for your encoder. The rpi inputs are only 3.3v. Its much safer if you set the internal rpi resistors to pull up, then wire your encoder to the zero volt, to pull the inputs down to zero.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://sites.google.com/site/picoreplayer/home

    Please donate if you like the piCorePlayer

  8. #78
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    560
    Many thanks Paul

    I'll have a play with that this evening.

    Just had a read up on pull-up resistors. I assumed the encoder needed 5V power for the rotary part to function, but I guess that was a rookie mistake. Is that the 'resist' option in the sbpd command line? (I won't have access to my piCorePlayer till I get home, so can't check the help, but I recall seeing that option documented somewhere).

  9. #79
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    560
    It works a treat, thank you Paul.

    I've programmed 5 buttons plus the 'push' function of the rotary encoder, and they all work as expected. Even the partially documented CMD_LONG seems to work, as well as the previously documented POWR command.

    It turns out the 5V is what the rotary encoder uses to generate the high pulses when the encoder is turned. It works just as well with 3.3V. The push function simply connects the SW pin to the GND pin, like any of my other button switches. I discovered that I can't simultaneously use the same pins to control the volume with the rotary encoder and my separate VOL+ and VOL- buttons - I guess that's because of a clash between the pulses generated by the encoder and the pull-up setting for the separate buttons. In my planned installation I probably won't use the rotary encoder at all, just the up and down buttons, but in testing I got it all to work by just using two different pins for the encoder.

    Great stuff. So now I can get on with planning an amplifier build with a built-in pCP RPi with some hardware buttons. The amplifier will be based on a Hypex DLCP, so I've been having a go at designing a PCB (my first!) to match the button layout on the DLCP input board - it's symmetric/reversible, so I'll probably mount it to mirror the DLCP buttons. I'm intending that it'll have an input box header to connect to the RPi, plus another to allow daisy-chaining another HAT, plus pin connections to allow the buttons and IR receiver to connect to whichever GPIO pins are still free (allowing for the daisy-chained HAT), either with hard-soldered leads or via header sockets and fly-leads.



    The DLCP control board:
    Last edited by chill; 2018-04-10 at 15:30.

  10. #80
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    1,165
    The resist function is how to set the internal input resistors.

    They either are set to
    Pull Up to 3.3v
    Pull Down to 0v
    or Off.

    Since your buttons connect the 0v line to the rpi input pin, you want to set the resistor to pull up, and then the "pressed" condition is 0 (This is the default setup of spbd).

    You should not interface 5 volts with any device that is not isolated from the pi. If 5 volts gets to the input pin, it will fry the input. Your encoder should work fine with 3.3v supply.

    As for the long press, it was intuitive for me....but then I programmed it Short of using a configuration file, I thought this was what made the most sense.

    b,17,PLAY,2,0,POWR,1500

    This will set the pull up resistor on pin 17, when the state of pin 17=0, the software acknowledges the button is pressed. If the button is released before 1.5 seconds, the PLAY command is sent, if the button is held for longer than 1.5 seconds, the POWER command is sent.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://sites.google.com/site/picoreplayer/home

    Please donate if you like the piCorePlayer

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •