Closed sznowicki closed 6 years ago
Does it work if the following code is used?
const pigpio = require('pigpio');
const Gpio = pigpio.Gpio;
// Call configureClock before creating Gpio objects
pigpio.configureClock(1, pigpio.CLOCK_PWM);
const l = new Gpio(25, { mode: Gpio.OUTPUT });
Here's a potentially related issue from the pigpio C library: https://github.com/joan2937/pigpio/issues/87
Looks like a potential fix. I'll check that in the evening (CEST) and post my results here. Thanks for a quick feedback!
It did fix the problem. Thanks a lot for pointing this out. If you find it useful, I'd be happy to edit the README by adding a Troubleshooting chapter with short description of my problem and links to this and C library ticket.
It did fix the problem.
Excellent.
Thanks a lot for pointing this out.
You're welcome.
If you find it useful, I'd be happy to edit the README by adding a Troubleshooting chapter with short description of my problem and links to this and C library ticket.
This is a very good idea. Maybe in a file called troubleshooting.md
in the doc directory. There could be a link to troubleshooting.md
in the Contents section.
I've created a pull request. Since I have only slight idea about the topic I describe, I tried to be as vague as possible.
https://github.com/fivdi/pigpio/pull/53
I also allowed myself to add an .gitignore entry. I hope this won't bother you. If not, can also remove it from the pull request.
@sznowicki thank you very much for the PR, it has just been merged.
This is probably not a bug in the library but maybe someone here would help me understanding what's going on.
I have a small RPi monitoring server implementation that uses the pigpio library in order to control the Google Voice Kit button and LED light.
Repo is here: https://github.com/sznowicki/rpi-av-monitoring-server.
When the node process is starting, it starts the mjpeg (video) and darkice (audio) stream.
At the moment I init the pigpio, audio stream goes mad. The full implementation is here, but in order to narrow the possible suspects i did a following test:
const l = new Gpio(25, { mode: Gpio.OUTPUT });
is called, darkice goes crazy throwing this warning repeatedlyAlsaDspSource :: Buffer overrun!
It's broken even if I kill node and darkice. As long as the device is not rebooted, the
Buffer overrun
is always thrown.I suspect that maybe, the library is abusing the connection on GPIO bus and makes "everything" too busy so the Google Voice Kit hat is not able to process audio any more?
Can it be the problem?
If not, I'd be glad for any suggestions how to deal with this issue.