Neopixel and Audio out

Good Morning,

I am very new to Node Red and Raspberry Pi. I started my first project. I want to control a neopixel strip and play audio files by clicking a button. With the help of Google I managed to setup the neopixel strip and made it working, but they said, that the audio isn't working together with it. Is there a way, that I can do both, without additional hardware?
My first project is a radio controlled car. I want to set the lights (neopixel), start some sounds, read the battery state, get the driven distance and save it to a file on the pi. There will be more questions in the future.
Thanks for your help and advice.

Have a nice day.

Danieldz

How do you plan to do the audio?
Have a speaker attached to the pi?
Are you trying to sync the audio to the lights? (if so, good luck with that)

You probably will need an amp of some sort and it is easiest to buy a hat for the Pi. I just happened to finish a project of building a music player on a Pi Zero W using a (HiFiBerry Mini amp -https://www.hifiberry.com/shop/boards/miniamp/).

The music is stored in a folder on the pi and plays one song after another till it reaches the end, then it starts again.

If, on the other hand, you want different sound clips, like an engine starting, a horn beeping, tires squealing you could use some of the same ideas.

Put the sounds (wav files) in a folder on the pi. Use node-red-contrib-play-sound to play the sounds. You may find this writeup helpful (https://github.com/MattVador/node-red-contrib-play-sound/issues/6) which I wrote when first using the node. One thing to note, I would only use one copy of the node in your flow to make it easier to keep straight.

Then just build your flows. I have another flow that has a PIR embedded in a skelleton's head. When it is triggered, it plays a sound and runs some servos to move the jaw. NOTE: If I remember correctly, you can't use PWM and sound at the same time becasue they both use the same peice of hardware. In the skelleton I just used two Pi Zero W's and had them passing messages with MQTT

Hi,
thanks for the answer. I am sort of planning it like you discribed it, that means having a speaker attached and also the lights.
I read it too, that I can't use PWM and sound at the same time. I just wanted to be sure, that there is no other way than using external hardware. I probably will use then an Arduino for the Neopixel Strip.
Thanks for the links.
Have a nice week..

Hi,
I started to make some test's with node-red-contrib-play-sound. How can I stop the sound?
Thanks for your help.
Have a nice week.

so i did the same but used this Raspberry Pi Audio Reactive LED Strip (2020) - YouTube
but as mic i used a headset usb to audio dec. the mic in was straitly connected to the aux out of my pi and thats it i hope that can help you