gandalf15/HX711

Example works fine but no output to terminal when I run "python3 hx711.py"

Closed this issue · 1 comments

Marcel,

Much appreciate you sharing the code. I have a my HX711 hooked-up to Rpi3. I am using a Dietpi image.
I am not a python programmer, but understand the basics.

When I run the "sudo python3 example.py" all works as planned. Just needed to mod my dout & sck pins.

Alas when I run "sudo python3 hx711.py" from the Terminal (ssh into headless setup) I get no output.
I checked the code and do see a number of print statements but no output.

How to I setup my 'dout_pin' and 'pd_sck_pin' In the hx711.py script. I using pin 9 and 11.
Do I need to take the information that I gathered after running the example.py script and insert that into the hxx711.py script.

Thanks in advance for sharing your work. Much appreciated.

Hi, I am glad that it is working. Unfortunately, you do not have good understanding of Object-oriented programming concepts. You cannot directly run hx711.py. It is a class which represents real object in the world and contains methods you can call on it. I would advice you to go through this tutorial: https://www.tutorialspoint.com/python/python_classes_objects.htm
I remember it helpe me a lot at the beginning.
I wish you good luck.