Home of the Squeezebox™ & Transporter® network music players.
Page 17 of 28 FirstFirst ... 7151617181927 ... LastLast
Results 161 to 170 of 275
  1. #161
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,333
    Steering the discussion back to sbpd, I've just spotted that there's a 'stopserver' command. Would it be sufficient to issue this command, via a button press in sbpd, before pulling the power? Would this ensure that no writing to cache and prefs is taking place at the moment the power is pulled, and hence prevent corruption of the SD card?

  2. #162
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,293
    you could issue a script to shutdown the server, but issuing a OS halt command is much easier.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  3. #163
    Senior Member chill's Avatar
    Join Date
    Mar 2007
    Posts
    1,333
    I agree that issuing the halt command is easy enough, but in a setup that's already using sbpd a script wouldn't be necessary. Isn't it just a case of adding a new command to sbpd_command.cfg, say:

    Code:
    XLMS=["stopserver"]
    ...and then assigning that command to a GPIO button press? Since 'stopserver' is an LMS command I'm assuming this stops LMS only, leaving pCP running, but since LMS is apparently the only process that might corrupt the SD card, it should then be safe to pull the power.

  4. #164
    Junior Member
    Join Date
    Apr 2019
    Posts
    13
    Quote Originally Posted by paul- View Post
    If you want to used gpio to control Jivelite, you will need to simulate keyboard events. I think this is covered in the Jivelite thread.
    Well i just finished reading through the 100 (!) pages of the Jivelite thread (I assume this is the one: https://forums.slimdevices.com/showt...r-piCorePlayer). Couldn't find a thing about gpio and/or simulating button presses

  5. #165
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,293
    Sorry to mislead you....Jivelite thread to understand key presses. Gpio Keys are handled by

    https://github.com/raspberrypi/linux...ys/README#L691

    Not sure if anyone has actually tried it. Best to start a new thread with what you are trying.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  6. #166

    EC11 Rotary encoder

    Hello,

    I have 3 of these: https://www.aliexpress.com/item/5PCS...27164c4dlJTvAw

    Can I use them as volume control? If yes, how is the wiring done as there is no vcc pin.

    I'm pretty rookie when it comes to wiring.


    I really appreciate any help!

    Thanks.

  7. #167
    Junior Member
    Join Date
    Apr 2019
    Posts
    13
    Quote Originally Posted by Jursi View Post
    Hello,

    Can I use them as volume control? If yes, how is the wiring done as there is no vcc pin.
    You don't need a Vcc pin. If they're like most other encoders, connect the center one of the three pins to ground and the other two as the up/down pins (reverse them if they go the wrong way when you turn the knob). The twp pins on the other side will be the push switch. Connect one of them to ground and the other to the gpio pin you are using for the push function - doesn't matter which of the two pins goes to ground and which goes to gpio.

  8. #168
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,293
    Thatĺs actually the safe way to connect button and encoders, and the way this program sets up encoders .
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  9. #169
    Quote Originally Posted by meq123 View Post
    You don't need a Vcc pin. If they're like most other encoders, connect the center one of the three pins to ground and the other two as the up/down pins (reverse them if they go the wrong way when you turn the knob). The twp pins on the other side will be the push switch. Connect one of them to ground and the other to the gpio pin you are using for the push function - doesn't matter which of the two pins goes to ground and which goes to gpio.
    Thank you for your answer!

    Is there some specific GPIO pins that I should use? How do I know if the GPIO pin has internal pull-up resistor enabled for example?

    Thanks!

    -Jursi
    Last edited by Jursi; 2019-05-12 at 01:08.

  10. #170
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    2,293
    Quote Originally Posted by Jursi View Post
    Thank you for your answer!

    Is there some specific GPIO pins that I should use? How do I know if the GPIO pin has internal pull-up resistor enabled for example?

    Thanks!

    -Jursi
    Just pick some, the pins will be configured in the software.

    Page 102 is the power up configuration on the bcm chip. https://www.raspberrypi.org/document...eripherals.pdf

    The firmware can change this too......but,donĺt worry much. Stay away from the i2c pins or other interface pins used by your DAC
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    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
  •