Raspberry Pi Forums » C/C++
368 FOLLOWERS
The Raspberry Pi Foundation is a UK-based charity. Our aim is to help people of all ages, all over the world, learn about computing and digital technology, so they can use it to make, create and get things done. This section is a place to discuss C/C++.
Raspberry Pi Forums » C/C++
3h ago
I've only performed a quick glance at the repo. I don't even have a spare rpi to attempt a compile upon. It looks like SimpleHx711Test isn't threaded so perhaps the quickest way to get to the problem is to build/run that under 'gdb' (perhaps "-g -O0") then issue a backtrace (bt) on it when it terminates?
I can't help any more than that I'm afraid.
Statistics: Posted by swampdog — Thu May 02, 2024 12:08 pm ..read more
Raspberry Pi Forums » C/C++
7h ago
The lgpio linked from hx711 repository was prior to RaspberryPi 5. I uninstalled this old version and installed the new version. I now have a message from the advancedHx711Test, so that is some progress:
$ ./advancedhx711test 2 3 1 0
terminate called after throwing an instance of 'std::runtime_error'
what(): no samples obtained
Aborted
Just as another check, on the Pi 5, my data is connected to GPIO 2 (pin 3), clock connected to GPIO3 (pin 5), 5V Power is connected to pin 4 and ground to pin 6. I have also tried connecting the power to the 3.3V at pin 1, same result.
I am yet to test the lg ..read more
Raspberry Pi Forums » C/C++
17h ago
The only dependency stated is lgpio, I have installed that, it would not build until I did that.
I’ll try some calls just using lgpio to confirm it is working. Thanks for the lead.
Statistics: Posted by gettingstronger — Wed May 01, 2024 8:07 pm ..read more
Raspberry Pi Forums » C/C++
17h ago
All dependencies required by the HX711 library, including lgpio, should be properly installed and configured on your Raspberry Pi. Have you done that?
Statistics: Posted by barshatriplee — Wed May 01, 2024 7:44 pm ..read more
Raspberry Pi Forums » C/C++
1d ago
'Gordon's wiringPi' which has been deprecated
Note that this is not the current wiringPi/wiringPi repository which has taken over from Gordons.
Since 2024, GC2 has taken over maintenance of the project, supporting new OS versions as well as current hardware generations.
Statistics: Posted by gettingstronger — Wed May 01, 2024 11:23 am ..read more
Raspberry Pi Forums » C/C++
1d ago
Hi, I have been spinning my wheels on this and am hoping someone can point me to the right direction.
I have a RaspberryPi 5 and am using c++. Having installed https://github.com/endail/hx711 and the prerequisite lgpio (http://abyz.me.uk/lg/lg.zip). I then build all the standard libraries and executables. When I try to run the SimpleHx711Test (and also the Advanced test) it just hangs.
I have used wiringPi to test that I am accessing the GPIO ports and can turn a LED on and off.
This is the error message I get when running in debug mode:
terminate called after throwing an instance of 'std ..read more
Raspberry Pi Forums » C/C++
2d ago
Hello friends, i am new to c and i wanted to make an 8 bit dac. I have an r2r dac which i need to control now, it should run at 48khz. I need to execute a quick interrupt function at the said 48khz or different frequencies, the function would prolly be like a gpio_put_masked() function or something.
Statistics: Posted by kacper1323 — Tue Apr 30, 2024 8:14 pm ..read more
Raspberry Pi Forums » C/C++
2d ago
Er, on that GitHub it says “ This repository is the continuation of 'Gordon's wiringPi' which has been deprecated, a while ago.”
Statistics: Posted by neilgl — Tue Apr 30, 2024 2:51 pm ..read more
Raspberry Pi Forums » C/C++
2d ago
Please notice wiringpi has been not deprecated!
https://github.com/WiringPi/WiringPi
Statistics: Posted by evil — Tue Apr 30, 2024 12:48 pm ..read more
Raspberry Pi Forums » C/C++
2d ago
Hi, I was looking for a c++ library and found lgpio. This is written in C, but I think it's simple to wrap in C++. This is a good library because it is simple, concise, and well written.
See this website for details:
https://abyz.me.uk/lg/lgpio.html
have a nice coding
Statistics: Posted by leocata72 — Tue Apr 30, 2024 12:44 pm ..read more