HX711
HX711 copied to clipboard
Add the delay when doing set_gain or power_up
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]
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:
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?!
regards Andreas