endail / hx711-rpi-py

Python bindings for Raspberry Pi HX711 C++ Library
MIT License
11 stars 4 forks source link

Install problem using python #9

Closed Compocity closed 1 year ago

Compocity commented 1 year ago

Hello,

I'am currently using the library with python on a Raspberry pi 4 b, raspbian 11 bullseye. Although I followed precisely the install steps, I am getting a syntax error with the following message:

Traceback (most recent call last): File "/home/pi/App/main.py", line 16, in communication = Communication() File "/home/pi/App/Communication.py", line 85, in init self.scale1 = SimpleHX711(self.hx711_data1,self.hx711_sck1_pin, 95014, 150000) NameError: name 'SimpleHX711' is not defined

I've tried everything I've could but did not find any solution. The cpp binaries are built and working well.

endail commented 1 year ago

There are two possibilities I can think of:

Compocity commented 1 year ago

I see, there was a mistake in the code.

In the header there was from hx711 import * instead of HX711 that caused the issue.

Thank you!

Compocity commented 1 year ago

Closing issue