ggurov / hx711

raspberry pi hx711 weight scale interface
56 stars 33 forks source link

Python #6

Open alduxvm opened 8 years ago

alduxvm commented 8 years ago

Is there a way to read the HX711 using a python? I'm reading via i2c a ADS1115 and also sending a PWM with a PCA9685, so, it makes sense having all working on python, I was wondering about the possibility of reading the HX711 with a python script.

cheers!

ggurov commented 8 years ago

i think the HX711 has timing that's really not suited for anything other than the raw hardware. it barely functions via C

-gurov

On Fri, Oct 9, 2015 at 11:33 AM, Aldo Vargas notifications@github.com wrote:

Is there a way to read the HX711 using a python? I'm reading via i2c a ADS1115 and also sending a PWM with a PCA9685, so, it makes sense having all working on python, I was wondering about the possibility of reading the HX711 with a python script.

cheers!

— Reply to this email directly or view it on GitHub https://github.com/ggurov/hx711/issues/6.

Tosa95 commented 7 years ago

That's true it only works in C, but you know, you can compile the C library for Python. I made it once for reading a proximity sensor and well, the result is amazing.

Furthermore, a lot of Python libraries are only a wrapper for C code. Think about things like SciPi or Theano which can also parallelize computation on GPU. They are Python libraries but their critical code is all written in C.

I'm also quite sure that the Python standard library is written in C at least for lists sorting and manipulation in general ;)