Welcome to the Pycom forum Forum
    • \[\[global:header.categories\]\]
    • \[\[global:header.recent\]\]
    • \[\[global:header.tags\]\]
    • \[\[global:header.popular\]\]
    • Login

    Explore Pybytes | Official Documentation | Report a Firmware Bug/Issue | GitHub

    Save HX711 Parameters with DeepSleep

    Scheduled Pinned Locked Moved LoPy
    4 Posts 2 Posters 52 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S Offline
      Simon RAPP
      last edited by

      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 !

      boot.py
      main.py
      hx711.py

      robert-hhR 1 Reply Last reply Reply Quote 0
      • robert-hhR Offline
        robert-hh @Simon RAPP
        last edited by

        @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.

        1 Reply Last reply Reply Quote 0
        • S Offline
          Simon RAPP
          last edited by Simon RAPP

          @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 ?

          robert-hhR 1 Reply Last reply Reply Quote 0
          • robert-hhR Offline
            robert-hh @Simon RAPP
            last edited by

            @Simon-RAPP Wake-up from Deep Sleep is a power on cycle. After that, you have to re-instantiate all devices.

            1 Reply Last reply Reply Quote 0

            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
            • 1 / 1
            • First post
              Last post

            Pycom on Twitter

            Pycom