endail / hx711

Raspberry Pi HX711 C++ Library
MIT License
18 stars 10 forks source link

Any experiences with running on RPi 5? #85

Open OldaHorak opened 6 months ago

OldaHorak commented 6 months ago

Hi, I tested the code on RPi 4B without problems. Then I copied the environment to RPi 5, installed all dependecies, set pins, but the tests does not work. The Calibration returns default values (0, 1), the SimpleTest returns zeros.

I googled problems with GPIO communication diffs between RPi 4B and RPi 5 and have a tip the problem is in libpilgpio version, but I'm not so good in this to understand.

Someone use the hx711 with RPi 5 ?

Thanks.

endail commented 5 months ago

Hi,

When you tested it on the Raspberry Pi 5, did you copy the files over from the Pi 4 or reinstall everything according to the instructions?

You may also need to run ldconfig after installing.

I only developed and tested this library on a Raspberry Pi Zero W.

njho commented 3 months ago

Curious about this as well myself

srtuss commented 1 month ago

For RPi 5 the expansion header GPIO pins are now on /dev/gpiochip4 instead of /dev/gpiochip0.

I got the hx711 library to work by changing Utility::openGpioHandle(0) to Utility::openGpioHandle(4), respectively in HX711.cpp.