Home of the Squeezebox™ & Transporter® network music players.
Results 1 to 2 of 2
  1. #1
    Junior Member
    Join Date
    May 2021

    help with an I2S DAC and pigpio interferences

    I am working on a radio with pCP plus Rpi Zero W where I add an I2S Rpi DAC (Adafruit MAX98357a).
    I also add an I2C display, a couple of buttons and a rotary encoder.

    To control the buttons I try to run "sbpd", but as soon as I start the pigpiod, the sound get interferences and distortions. I think it's a problem with I2S interface clock, but I'm not sure.

    I have tried the "-t 0" parameter in pigpiod, but no luck.

    Any idea how to fix the problem?
    Maybe I missed some parameter or settings?
    Can I control the buttons and the encoder in another way than using pigpiod?

    Thanks to all.

    [Translated with www.DeepL.com/Translator]

  2. #2
    Junior Member
    Join Date
    Apr 2006
    Quote Originally Posted by vwpolo View Post
    Can I control the buttons and the encoder in another way than using pigpiod?
    I just saw this so I hope you haven't given up hope. I'm not sure if you are writing software to support this or if you just want to wire it up and have it work. If you are NOT writing software, I don't think I can help.

    I use a rotary encoder and buttons in a PI/Python3 project I've been refining for about 27 months. However, my project doesn't put the UI in the same PI as the player so I don't know if it interacts with the I2S interface. I really don't see how it would since the I2S pins are not the ones I use for the buttons and rotary encoder.

    For the buttons, I use RPi.GPIO instead of pigpiod. I don't know what type of dependencies you have on pigpiod and having never used pigpiod I have no real frame of reference.

    For the rotary encoder I followed this blog post: https://blog.ploetzli.ch/2018/ky-040...-raspberry-pi/
    I use this encoder (with button) with my pi zero: https://www.adafruit.com/product/377

    In the blog post, the author also mentions using the same type of config.txt/dtoverlay change to support buttons. I haven't done that because I had the buttons working before I added the encoder. However, I will probably change to using config.txt/dtoverlay for my buttons in a future cleanup as the GPIO button stuff using the evdev interface looks like it would be much cleaner and more reliable. I also have a touchscreen (from Adafruit) attached as the main UI and the events for touch come through the same evdev interface though from a different device. Using "select" (or something like it) allows me to wait for events from as many devices as I might need.

    I hope this helps you or someone else.

Posting Permissions

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