Save HX711 Parameters with DeepSleep
-
Hello,
In my projet, I use a Lopy4 and an HX711 to mesure beehive weight. I must use the DeepSleep function, in order to maximize the battery life. Weight datas are send on Sigfox. In order to tare the Load Cell, I use a function which is trigged by an interupted push button. I want to tare only one time at the placement of the scale under the beehive. After, Lopy4 measure weight and send it every x minutes. Deepsleep is used bettween each measurment and sending phases.
But, I have a problem with HX711 parameters. It looks that HX711 parameters are losted during deepsleep. So my measurments are wrong.
Do you know how to fix this problem ? Is it possible to save HX711 parameter's ?
Thank you for your answers !
-
@Simon-RAPP you can write it to a file. If the file then contains valid python code, like:
tare = 12345
You can simply import it to get the value. -
@robert-hh
Hello,I don't think that is the tare which causes problems. I think that the HX711 statement reset HX711. ( hx711 = HX711('P8', 'P9') # P8 Data - P9 Clock ).
What do you think about that ? How can I do for that statement be executing only at the power ON ?
-
@Simon-RAPP Wake-up from Deep Sleep is a power on cycle. After that, you have to re-instantiate all devices.
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login