Adafruit_Blinka: Timed Out Error with PulseIn on Raspberry pi
This happens on my Raspberrypi zero(Buster) and Raspberrypi 3(stretch):
Python 3.7.3 (default, Dec 20 2019, 18:57:59)
[GCC 8.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import board, pulseio
>>> p = pulseio.PulseIn(board.D14)
/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/bcm283x/pulseio/libgpiod_pulsein: error while loading shared libraries: libgpiod.so.2: cannot open shared object file: No such file or directory
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/bcm283x/pulseio/PulseIn.py", line 64, in __init__
message = self._wait_receive_msg()
File "/usr/local/lib/python3.7/dist-packages/adafruit_blinka/microcontroller/bcm283x/pulseio/PulseIn.py", line 80, in _wait_receive_msg
raise RuntimeError("Timed out waiting for PulseIn message")
RuntimeError: Timed out waiting for PulseIn message
I first notice this error when I was using ultrasonic sensor, see https://github.com/adafruit/Adafruit_CircuitPython_HCSR04/pull/16
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 15 (3 by maintainers)
Hi, have you been able to solve this? If not please try running
sudo apt install libgpiod2
.Solved after I run
sudo apt install libgpiod2
Thank you!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.
No, you should not need to do that, if you have enabled the timer (If you use a timer) or the service, via
systemctl enable servicename
, a symlink to the required location (in your case it’s added to default.target), which is enough.Try adding
User={User that works when running the command manually]
to the Service part