olkal / HX711_ADC

Arduino library for the HX711 24-bit ADC for weight scales
MIT License
235 stars 124 forks source link

using channel A + B together #97

Closed vina258466 closed 2 years ago

vina258466 commented 2 years ago

i want to try to use two load cells but only use one hx711 module, the first load cell i connect to channel A and the second load cell i connect to channel B, how can i use this library, please share the solution for my problem

olkal commented 2 years ago

You can select the B-channel like this: LoadCell.setGain(32); and back to A-channel: LoadCell.setGain(128);

I don't have the solution or any code example for what you try to acheive. There is only one dataset in the library and until that has been "flushed" with new readings from the selected channel, the average value would be a mix of channel A and B. So to make it work I think you should use two instances of the library, one instance for each channel. Also note that the B-cannel have a gain of only 32, so it's likely to have more noise and less resolution compared to the A-channel.

If possible, use one dedicated HX711 for each loadcell.

vina258466 commented 2 years ago

thank you for the information

github-actions[bot] commented 2 years ago

This issue is stale because it has been open for 30 days with no activity.

github-actions[bot] commented 2 years ago

This issue was closed because it has been inactive for 14 days since being marked as stale.