-
Notifications
You must be signed in to change notification settings - Fork 353
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Timed Out Error with PulseIn on Raspberry pi #259
Comments
@hyansuper did you try with other pin? I just noticed this on your error log If I'm not wrong that pin is assigned to TXD0 as I could see in https://pinout.xyz/pinout/pin8_gpio14, do you have the UART enable? |
I don't have UART enabled. I also tried many other pins, same error. Do I have to manually install libgpiod? I tried to install libgpiod with this script but failed. below is the log running the script
|
Hi, have you been able to solve this? If not please try running |
Solved after I run |
Solved, Thank you!!! |
If you are encountering this problem on an older version of Raspberry Pi OS, download libgpiod2 from the Debian website, the one for Buster, and install that one. LibGPIOD2 is not available on versions before buster, so you'll have to do it the hacky way |
I encounter this problem only if I run my python program from a systemd service. Any ideas why? |
The systemd service runs as possibly the wrong user, who does not have the libraries required installed. What's your systemd service look like? |
[Unit] [Service] [Install] |
Try adding |
Wow thanks for that fast answer it works! Perfect. |
No, you should not need to do that, if you have enabled the timer (If you use a timer) or the service, via |
I was running into this too as root. The comment about systemd service file needing a username added made me try it as a non-root user and it works now. Thank you! |
Any idea how to fix this on arch? Running arch linux arm on my rpi, installing libgpiod doesn't work and libgpiod2 doesn't exist. I even tried converting the libgpiod2 deb package with debtap, didn't work either |
You could try compiling from source: https://github.com/adafruit/libgpiod_pulsein If you need libgpiod, that can also be compiled from source. See https://learn.adafruit.com/adding-a-single-board-computer-to-blinka/software-setup#installing-libgpiod-from-source-3058818. |
This happens on my Raspberrypi zero(Buster) and Raspberrypi 3(stretch):
I first notice this error when I was using ultrasonic sensor, see adafruit/Adafruit_CircuitPython_HCSR04#16
The text was updated successfully, but these errors were encountered: