Home of the Squeezebox™ & Transporter® network music players.
Page 43 of 43 FirstFirst ... 33414243
Results 421 to 427 of 427
  1. #421
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,489
    All kinds of things you can do with software. This tool was just not written that way.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  2. #422
    Junior Member
    Join Date
    Apr 2019
    Posts
    11
    Quote Originally Posted by Turner1200 View Post
    For this project, I really want to preserve the outside and interface of the old radio. While this means in principle keeping the non-momentary original switches (buttons), you make we wonder if there is an indirect way to have the non-momentary switches activate a second set of momentary switches on their way to the GPIO pins, maybe through a time delay circuit or relay? I’ll have to do some reading.

    On the software side, I wonder if I could modify the code that monitors the pins to register a button push if a connection is made via my non-momentary button. It could fire after a fixed time delay if the signal is maintained on specified pin. After a longer delay, if there was no further activity, the pin could be reset so it’s not left floating. Any thoughts on which portion of the source code I would need to look at?

    Alternatively, maybe I could take the idea of a delay / second button and execute it in software. Maybe a script that reacts to a change on pin 1, triggered by my mechanical non-momentary switch, and then momentarily flips a second pin on and off on the Pi, which sbpd could interpret as a button push?

    I’ll try and work through a few possibilities and share any results.


    Hello Turner1200,

    i faced the same problem when i wanted to rebuild an old cassette recorder with pcp.
    Last but not least, I used gpiozero and LMSTools to control toggle style switches and rotary encoders.
    This combination works very well with pcp and is relatively easy to implement.
    If you need some advice i can help.

    Greetings

  3. #423

    Capacitive touch

    I now have a https://www.adafruit.com/product/1374 capacitive touch connected to pin 20 and have set both resist and pressed to 1 as the output goes high when activated. Is this correct?

  4. #424
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,489
    Depends on how you have the software configured. But those button output voltage when pressed.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  5. #425
    Quote Originally Posted by paul- View Post
    Depends on how you have the software configured. But those button output voltage when pressed.
    This works:
    sbpd -v b,20,POWR,0,1

    Now I can turn it on/off just by touching the body of the player.
    Name:  squeeze.jpg
Views: 120
Size:  219.5 KB
    Last edited by mfraser; 2021-10-26 at 23:52.

  6. #426
    Junior Member
    Join Date
    Apr 2017
    Posts
    6
    Hello,

    i have this rotary encoder KY040 or KY-040:
    Name:  s-l500.jpg
Views: 53
Size:  23.0 KB
    there are 5 connectors: CLK, DT, SW, + and GND

    GND to GND
    SW (Switch) like an button to a GPIO, so i can use the rotary encoder as button, when pressed in the middle.

    now i have 3 left: CLK, DT and +
    can someone give me a hint how to connect this one to the raspberry to use with sbpd?

    [edit]
    ok i tried and it works:
    + is 3V3
    CLK is PIN1
    DT is PIN2

    so my command is now:
    sbpd b,22,PLAY e,24,25,VOLU
    Last edited by Besth; 2021-11-22 at 08:03.

  7. #427
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,489
    The other pins are for the push button on the stem of the encoder. You can connect that to GPIO and do something else.
    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
  •