Open brettm2 opened 4 years ago
@caternuson want to see if you can reproduce this?
@tannewt Yep, recreated. I went back to just the basic setup per the guide: https://learn.adafruit.com/adafruit-max98357-i2s-class-d-mono-amp/circuitpython-wiring-test and still see the issue. So may be something more fundamental and not related to MSA301.
Tested as follows. Libraries from 20200714 bundle release.
Adafruit CircuitPython 5.3.1 on 2020-07-13; Adafruit ItsyBitsy M0 Express with samd21g18
>>> import audioio
>>> import board
>>> import audiobusio
>>> wave_file = open("StreetChicken.wav", "rb")
>>> wave = audioio.WaveFile(wave_file)
>>> audio = audiobusio.I2SOut(board.D1, board.D0, board.D9)
>>> audio.play(wave)
>>> audio.play(wave)
>>> audio.play(wave)
>>> audio.play(wave)
>>>
The issue isn't there all the time. Some of the playbacks above were OK. Some (most) were distorted.
Thanks @caternuson! @jepler any ideas what could cause this?
Increasing the buffer size may help. We saw similar issues on RP2040 PropMaker.
Just a heads up: The board you have doesn't support I2S, and you're attempting to use I2S to run the speaker. I ran into this problem and figured I'd leave this here in case anyone else runs into this issue.
I've had noise issues with the Itsy Bitsy M0 Express and have boiled it done to attaching the MSA301 Accelerometer. I can attach neopixels, buttons, etc. but as soon as I attach the accelerometer I get random loud noise. I've also tried different speakers and audio boards with no change in the noise. The noise can occur right when I turn it on or it may wait 3-4 sec before starting.
Here is the simplified code:
Here is a wiring diagram:
I'm pretty new at adding sound to projects so I'm hoping it's something simple I'm not seeing. Any help figuring this out would be greatly appreciated.