I’m a bit desperate to get in touch with you guys, because I just can’t seem to get simple sounds to come out through a speaker using a Photon.
I have even ordered an additional amplifier, but even with that I do not want to succeed.
Do I need the amplifier at all?
At the amplifier I have only the pins Vin, GND and Din controlled, because I think that I do not need the others?
Maybe someone has time and strength to offer me some assistance here?
I would like to use the following components for sound output:
Adafruit I2S 3W Class D Amplifier Breakout - MAX98357A
Adafruit Mono Enclosed Speaker - 3W 4 Ohm
i just want to output simple long/short sounds, no special files or similar.
is there a way to do this?
I thank in any case already many times in advance and would be very grateful for any help
For such simple sounds I’d rather use some kind of buzzer rather than a speaker.
With a speaker like this you will definitely need some extra drivers to get enough volume while not grilling your GPIO.
On the other hand, your amplifier is meant for I2S communication but while the Photon has I2S capabilities there seems to be no simple library to facilitate that.
For your intended use that’d be way over the top IMHO
If you’d want to play some simple wave sounds you could use an analog amplifier like this
and the DAC pin(s) on the Photon with this library
For even more elaborate sounds you could use this cheap MP3 module (with onboard amp)