Welcome to EnviroDIY, a community for do-it-yourself environmental science and monitoring. EnviroDIY is part of WikiWatershed, an initiative of Stroud Water Research Center designed to help people advance knowledge and stewardship of fresh water.
New to EnviroDIY? Start here

Logging interval resets every ~256 samples

Home Forums Mayfly Data Logger Logging interval resets every ~256 samples

Viewing 3 reply threads
  • Author
    • #12703

        When powering on the MayFly running a script with a Logger object, 10 samples are recorded at 2 minute intervals, regardless of what the value of loggingIntervalMinutes is. After these 10 samples, the logger reverts to loggingIntervalMinutes.

        I have additionally found that every ~256 measurements, (in my case, where I’m sampling at 15 minute intervals, this happens every 2 2/3 days), I get a string of 10 samples at 2 minute intervals. And then it goes back to loggingIntervalMinutes. Is this expected behavior? And does this mean that the MayFly is power cycling, or is (for example) some internal counter overflowing? Any insight appreciated.

      • #12704
        Shannon Hicks

          What sketch are you running? Is it a sample from this forum, or from our Github repo, or something you wrote?

        • #12705

            Sounds like Modular Sensors Library? The original versions had 2 minute readings scheduled at the beginning of logging to make it quick/easy to see if a station was logging upon deployment. I think @srgdamiano recently removed this from the new version of the Modular code.

          • #12706
            Sara Damiano

              Assuming you’re using the modular sensors library, the 2 minute reading on the start-up was a feature that was supposed to help with debugging. The idea was that right after deploying a station you’d want to make sure it was working so you’d want frequent measurements. I took it out in the most recent release because nearly everyone was confused by it and thought there must be a bug.

              Between versions ~0.6.6 and ~0.11.5 I’d additionally mistakenly set the internal sample count to an 8-bit instead of 16 bit integer, which was causing the sample count to roll over at 256 samples and re-enter the start-up interval.

              So, I think updating your library should make it work the way you expect. Please let me know if it doesn’t!

          Viewing 3 reply threads
          • You must be logged in to reply to this topic.