lonelysushi wrote:
...
awesome thanks, I will give that a try next few days to get a single one working first... once one is working, i just have to connect the other three to any three other pairs of pins and it should read them together?
thanks again!
Not quite, because of the way I generate the clock to be sure it is always less than 60 µs. If you want to use that code as is I'd instantiate an object per HX711 (separate clock and data) but only have one operational at a time.
Something like.
Code: Select all
s1 = HX711.sensor(pi, DATA=9, CLOCK=10, mode=CH_A_GAIN_128)
s2 = HX711.sensor(pi, DATA=11, CLOCK=12, mode=CH_A_GAIN_128)
s3 = HX711.sensor(pi, DATA=13, CLOCK=14, mode=CH_A_GAIN_128)
s4 = HX711.sensor(pi, DATA=15, CLOCK=16, mode=CH_A_GAIN_128)
sensors =[s1, s2, s3, s4]
for s in sensors:
s.pause()
while True:
for s in sensors:
s.start()
time.sleep(0.2)
count, mode, reading = s.get_reading()
s.pause()