Home of the Squeezebox™ & Transporter® network music players.
Page 1 of 5 123 ... LastLast
Results 1 to 10 of 42
  1. #1
    Senior Member
    Join Date
    Jun 2012
    Posts
    478

    Track Info etc. on OLED for PCP

    A little while ago, I did some work to get the second OLED screen on my Audiophonics EvoSabre working with PCP. I ended up with several people using it and some using it with different dacs and displays. It dawned on me that the original project was really just displaying track/now playing etc. info on an OLED device on PCP, and some separate config steps specific to the EvoSabre. So, I've split them apart into 2 separate things.

    So, for anyone interested, I've posted a script, extensions etc. to add OLED output to PCP to my repo at https://github.com/peteS-UK/EvoSabre-DAC-PCP Instructions are there in the readme, but basically you should just be able to download and execute a script to install it all on a fresh PCP image.

    It's in Python so there's no fancy animations etc., but it includes ....

    • Alternate between Title/Track-Info and Artist/Album when playing, with automatic scrolling when required
    • Auto discover LMS IP and player MAC address
    • Use combination of subscription for state changes (power, play etc.) and jsonrpc polling when playing, with separate backup polling in case subscription doesn't update
    • Font sizes, text locations etc. are configurable in external .cfg file
    • Potential support for any device supported by luma.oled
    • Auto switching between day and night contrast, with contrast levels defined in external .cfg
    • Separate screen saver contrast setting, with screen saver contrast and screen saver delay in external .cfg
    • Display clock when player is stopped or off


    It's pretty much rewritten since the original version which I adapted from the (very) old files from audiophonics, so no doubt there will be some glitches, but hopefully it's useful for others as well.

    Let me know if you have any questions or suggestions. As I say in the readme, in theory, it should work with any SPI connected OLED for which there's support in luma.oled, but you'll likely need to create a section in the config file to give the locations and sizes to match the screen layout. It should also be possible to add I2C support if anyone feels like trying it.

    pete S

  2. #2
    Well. After some time, it seems to work pretty well on my raspdac mini oled.
    Thanks for your work, and time.
    I appreciate😁👍

  3. #3
    Senior Member
    Join Date
    Jun 2012
    Posts
    478
    Thanks for the testing @davidscrat. Good to have updated the config for the SSD1302

  4. #4
    Junior Member
    Join Date
    Dec 2021
    Posts
    13
    For a couple of days I have a Evo-Sabre and it works perfect. Thank you.
    I have one suggestion (because it happen to me) maybe it is possible that your install script to check and add dtparam=spi=on to config.txt. I forgot about and spend some time to see why it did not work.
    At least in your git add this to readme - user to add or to check if exists in config.txt.

    My install use also 7 inch whaveshare screen with Jivelite.
    In this case it does not work lirc, instead keymap for Jivelite to be used.
    For Evo-Sabre remote I made a IR remote keytable for Jivelite (reference here https://forums.slimdevices.com/showt...CorePlayer-5):

    Code:
    # table: sabre, type: nec
           
    0x801951 KEY_B # remote right
    0x80194f KEY_Z # remote left
    0x801917 KEY_LEFTBRACE # remote up 
    0x801916 KEY_C #  remote down
    0x801950 KEY_G # remote centre button
    0x80191d KEY_P # remote play
    0x801946 KEY_EQUAL # remote vol +
    0x80191c KEY_MINUS # remote vol -
    Description of commands to Jivelite here: https://github.com/ralph-irving/tcz-...r/jivekeys.csv
    Last edited by Livs; 2022-06-30 at 05:14.

  5. #5
    Senior Member
    Join Date
    Jun 2012
    Posts
    478
    Quote Originally Posted by Livs View Post
    For a couple of days I have a Evo-Sabre and it works perfect. Thank you.
    I have one suggestion (because it happen to me) maybe it is possible that your install script to check and add dtparam=spi=on to config.txt. I forgot about and spend some time to see why it did not work.
    At least in your git add this to readme - to be added or check.
    [/url]
    Hi @livs

    Glad it's working. Sure - easy enough to add a check, but I thought it was on by default with PCP. I always see a line

    Code:
    dtparam=i2c_arm=on,spi=on,i2s=on
    when I've looked, so assumed it was always there. What version of PCP are you using? Just curious why you're not getting that line, or what in the way I've been setting things up enables it. I just looked at another pi with a hifiberry dac on it, and that has the above line.

    pete S

  6. #6
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,875
    Spi was turned off by default recently. Iĺve had it cause some conflicts, and figured I would those adding screens would know to look for spi.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  7. #7
    Senior Member
    Join Date
    Jun 2012
    Posts
    478
    Quote Originally Posted by paul- View Post
    Spi was turned off by default recently. Iĺve had it cause some conflicts, and figured I would those adding screens would know to look for spi.
    Thanks @paul. That would explain it then. I guess this is more "embedded" than people doing DIY - i.e. you're buying something prebuilt - so people may not know. I'll take a look. Do you have nothing by default now, or do you have spi=no?

    pete S

  8. #8
    Senior Member paul-'s Avatar
    Join Date
    Jan 2013
    Posts
    4,875
    This is the interfaces line that we put in by default.

    dtparam=i2c_arm=on,i2s=on

    There should be no reference to the interface in the file by default now. You should be safe to look for "spi" and then add a full line if needed.
    piCorePlayer a small player for the Raspberry Pi in RAM.
    Homepage: https://www.picoreplayer.org

    Please donate if you like the piCorePlayer

  9. #9
    Senior Member
    Join Date
    Jun 2012
    Posts
    478
    OK - just added this

    Code:
    # Does config.txt already contain spi
    while read line; do
        echo $line | grep -q spi
            if [ $? -eq 0 ]; then
      	        spi=$(echo $line)
            fi
    done < /mnt/mmcblk0p1/config.txt
    
    if [ "$spi" == "" ]; then
    # no entry for SPI, so add one
        mv /mnt/mmcblk0p1/config.txt /mnt/mmcblk0p1/config.sav
        awk '/#---Begin-Custom-/ { print; print "dtparam=spi=on"; next }1' /mnt/mmcblk0p1/config.sav >> /mnt/mmcblk0p1/config.txt
    fi
    Looks for spi, and if it finds nothing, adds a new dtparam line after the Begin Custom line. This won't cover a scenario where someone's does something quirky to their config.txt already, but then I guess it's over to you. But, if spi is already there, it's likely either a) an older version of pcp which has been upgraded, or b) been added deliberately, so we probably don't want to mess with it. However, if there's no spi at all, then it'll add the line. I'll post this to the repo later once I've had a chance to try it on a vanilla pcp 8.2

  10. #10
    Senior Member
    Join Date
    Apr 2005
    Location
    UK/London
    Posts
    5,825
    I'd be tempted to increase the size of the search string just in case something else arrives in the future that happens to have "spi" in it but is not the field that you were looking for.
    Paul Webster
    Author of "Now Playing" plugins covering Radio France (FIP etc), PlanetRadio (Bauer - Kiss, Absolute, Scala, JazzFM etc), KCRW, ABC Australia and CBC/Radio-Canada
    and, via the extra "Radio Now Playing" plugin lots more - see https://forums.slimdevices.com/showt...Playing-plugin

Posting Permissions

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