I am having issues reading weight measurement from HX711 connected to my Orange pi zero using python3.
I found numerous Raspberry pi libs for HX711, and I tried some workarounds to operate with OPI.GPIO rather then RPI.GPIO, but I've had no success.
I am trying to use this lib HX711 Python library and the example from the lib. I edited the lib to import OPI.GPIO and the example file as well. I also append GPIO.setmode(GPIO.BOARD) as I received errors regarding the GPIO mode.
When I run the script I receive the following error, but I still can not figure out what is the problem.
GPIO.setup(self._pd_sck, GPIO.OUT) # pin _pd_sck is output only Traceback (most recent call last): File "./hx4.py", line 15, in <module> hx = HX711(16, 18) File "/usr/local/lib/python3.6/dist-packages/hx711/__init__.py", line 61, in __init__ GPIO.setup(self._dout, GPIO.IN) # pin _dout is input only File "/usr/local/lib/python3.6/dist-packages/OPi/GPIO.py", line 354, in setup pin = get_gpio_pin(_mode, channel) File "/usr/local/lib/python3.6/dist-packages/OPi/pin_mappings.py", line 80, in get_gpio_pin return _pin_map[mode][channel] KeyError: 16
Could you please help me out with this?