Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
  1. Home
  2. Development
  3. BH1750 library issue with using sleep

BH1750 library issue with using sleep

Scheduled Pinned Locked Moved Development
6 Posts 3 Posters 849 Views 3 Watching
  • 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.
  • RayneR Offline
    RayneR Offline
    Rayne
    wrote on last edited by
    #1

    I seem to have a problem with receiving ACK when using the sleep_time function in the example sketch for the BH1750FVI. Every time I leave the sleep function in the sketch, I end up only getting one value report with ACK during the presentation. After that within the loop, and watching the serial monitor, the values are no longer reported and I keep getting ST=NACK all the time. The only way so far for me to get the sketch working correctly, is if I use the wait function and remove the sleep function from the sketch. Has anyone else had this problem and if so, know of a way to resolve this?

    mfalkviddM 1 Reply Last reply
    0
    • RayneR Rayne

      I seem to have a problem with receiving ACK when using the sleep_time function in the example sketch for the BH1750FVI. Every time I leave the sleep function in the sketch, I end up only getting one value report with ACK during the presentation. After that within the loop, and watching the serial monitor, the values are no longer reported and I keep getting ST=NACK all the time. The only way so far for me to get the sketch working correctly, is if I use the wait function and remove the sleep function from the sketch. Has anyone else had this problem and if so, know of a way to resolve this?

      mfalkviddM Offline
      mfalkviddM Offline
      mfalkvidd
      Mod
      wrote on last edited by mfalkvidd
      #2

      @rayne are you using nrf24? If that’s the case, the solution is probably https://forum.mysensors.org/post/92971 / https://github.com/mysensors/MySensors/pull/1193

      1 Reply Last reply
      0
      • F Offline
        F Offline
        flopp
        wrote on last edited by flopp
        #3

        @Rayne
        Can you upload your code. Two days ago I built a battery powered node with BH1750 and don't have any problem.
        MySensors version?
        Running on a Arduino Nano?
        Battery powered?
        Serial/Ethernet GW?

        1 Reply Last reply
        1
        • RayneR Offline
          RayneR Offline
          Rayne
          wrote on last edited by
          #4

          @mfalkvidd yes, I am. So the solution is to load 2.3.1 beta in order to avoid sleeping too fast for the radio to send, receive, ack, settle so to speak?

          mfalkviddM 1 Reply Last reply
          0
          • RayneR Rayne

            @mfalkvidd yes, I am. So the solution is to load 2.3.1 beta in order to avoid sleeping too fast for the radio to send, receive, ack, settle so to speak?

            mfalkviddM Offline
            mfalkviddM Offline
            mfalkvidd
            Mod
            wrote on last edited by
            #5

            @rayne exactly

            RayneR 1 Reply Last reply
            0
            • mfalkviddM mfalkvidd

              @rayne exactly

              RayneR Offline
              RayneR Offline
              Rayne
              wrote on last edited by
              #6

              @mfalkvidd Thanks for the advice and I went and downloaded the Mysensors 2.3.1 beta with @tekka 's latest patch. However I will have to report back later how that went after updating the gateway and nodes with the new version. I'm suffering from a human bug right for the past couple of days. Gotta get over this. I have a good feeling this will resolve any issues with sleeping the radios. Thanks again to @mfalkvidd and @tekka for this should anyone find themselves in this particular situation.

              1 Reply Last reply
              1
              Reply
              • Reply as topic
              Log in to reply
              • Oldest to Newest
              • Newest to Oldest
              • Most Votes


              21

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              Posts


              Copyright 2025 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
              • Login

              • Don't have an account? Register

              • Login or register to search.
              • First post
                Last post
              0
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular