bogde / HX711

An Arduino library to interface the Avia Semiconductor HX711 24-Bit Analog-to-Digital Converter (ADC) for Weight Scales.
MIT License
876 stars 535 forks source link

Using HX711 library on Adafruit nRF52840 #223

Open rymd80 opened 2 years ago

rymd80 commented 2 years ago

I am converting a scale application from a raspberry pi to the Adafruit nRF52840.

This requires converting existing python code from standard python to CircuitPython.

I'm looking for information on how to install the HX711 library for use in a CircuitPython program.

I am able to successfully run the 'make clean build-all' after installing platformio on my Ubuntu 20.10 dev computer.

The HX711/.pio/build/adafruit_feather_nrf52840 directory contains the following: firmware.elf firmware.zip firmware.hex

Can someone tell me if the compiled output is of the HX711 library is compatible with CircuitPython and if so what needs to be installed/copied to where? From what I've read so far... I think one of these files needs to be copied into the lib folder on the nRF52840. So far, I haven't been able to get the import in a python source file to find the HX771 library.

Thanks in advance.

bogde commented 2 years ago

i think you need a library that was written for circuitpython or micropython. two examples that i quickly googled:

https://github.com/Miakatt/Hx711_circuitpython https://github.com/SergeyPiskunov/micropython-hx711

note that i didn't test any of those and i don't know if they work or not.