dangrie158 / opencushion

A c++ driver and a node binding for the HX711 Load Cell Amp
MIT License
14 stars 17 forks source link

How to read port B on hx711? #6

Open carlberg74 opened 6 years ago

carlberg74 commented 6 years ago

Is this possible? Cant find any api to change port.. or am I missing something?

dangrie158 commented 6 years ago

Hi,

I had to take a look at the datasheet but it seems to be indeed possible in the current code (although not very well documented): According to https://cdn.sparkfun.com/datasheets/Sensors/ForceFlex/hx711_english.pdf you can select the channel and gain by specifying the number of clock bits. You can have the following configurations:

PD_SCK Pulses Input channel Gain
25 A 128
26 B 32
27 A 64

Which means, setting the gain to 32 should automatically switch to channel B. I don't think it is possible to use channel B with any other gain.

Hope this helps