HX711 icon indicating copy to clipboard operation
HX711 copied to clipboard

Add the delay when doing set_gain or power_up

Open WLimin opened this issue 7 years ago • 1 comments

Add the delay when doing set_gain or power_up. fix variable type declare. Add new demo, base on HX711SerialBegin.

Signed-off-by: wang [email protected]

WLimin avatar Aug 30 '17 05:08 WLimin

Hello @bogde!

Maybe you will integrate @WLimin added delay?! In my sketch i read the values of 2 HX711, one with a gain of 64 (HX711 scale) and the other 32 (HX711 druck). (In the final sketch HX711 scale will run on a gain of 128) I tested it see this problem: After the power_up function I saw that the first (or more) values are wrong. I don't testet with delays between power_up and read(), but also 10 seconds change anything. So I implemented @WLimin "delay" to your library, because I seems your library is still under developing. And it works: image

I have also added the delay in set_gain, so it also reads correct values after the µC boot up.

Why the Code-Comments say 5 times are invalid in power_up and 6 times in set_gain??? I only copied it. Maybe someone can explain it to me?!

Maybe you will also implement it or see a better solution?!

HX711_full_example.zip

regards Andreas

andig91 avatar May 27 '20 21:05 andig91