I’m trying to control the gpio 12 and 13 pins on the respeaker 2 hat from within node-red (installed in a docker-container).
If I could use these pins it would open a possibility to add infrared transmitter possibilities to the rhasspy-raspberry system.
I tried two ways to do it, but none of them works
Here’s my node-red flow: https://www.dropbox.com/s/oxcr5c3bzbmrb5k/gpioflow.json?dl=1
any idea how to do it using node-red (without making a modified node-red image)?
I let this node communicate to the GPIOs with pigpiod, which I installed in a Docker container (I think it was the corbosman/pigpiod image). But running pigpiod directly on Raspberry Pi OS should be fine too.
I let this node communicate to the GPIOs with pigpiod , which I installed in a Docker container (I think it was the corbosman/pigpiod image). But running pigpiod directly on Raspberry Pi OS should be fine too.
I installed pigpiod in node-red (using manage palette), this time it installed without problems.
I made the following docker-compose.yml
I have no experience with pigpiod but to use gpios in docker you need to at least add a device to your docker compose. To get access to WiringPi via docker I needed to add those lines to my docker-compose, pigpiod might need something similar:
I noticed that my respeaker-2 started acting strange after installing the corbosman/pigpiod
Suddenly the respeaker-2 started speaking slowly and with a very low bass voice. Music also played too slowly and frequencies were shifted to the low frequency range.
I reinstalled the drivers for the respeaker-2 but that didn’t help. Finally I removed the pigpiod container and restarted the raspberry. Now the respeaker-2 is acting normally again.
I think your pigpiod might be configured to use PCM as its clock peripheral, and that is also needed for the sound output of the respeaker. There is a option to choose either PWM or PCM. If you choose PWM instead the onboard headphone output will not work. http://abyz.me.uk/rpi/pigpio/pigpiod.html
Try to run pigpiod with -t 0 option to choose PWM instead of PCM and the audio of your respeaker-2 should work again.
If i understand it right you can somehow pass those options to your container.
Try to add command: -t 0 to your pigpiod container…
It works, thanks for the help fastjack and moqart
This is what I have now in my docker-compose.yml for pigpiod:
command: -t 0