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. General Discussion
  3. delay for LDR sensor

delay for LDR sensor

Scheduled Pinned Locked Moved General Discussion
13 Posts 2 Posters 3.1k Views 2 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.
  • DickD Dick

    thanks for the advise. I changed the If into you sugested (what is much better that 5% difference) but the ldr is still logging (10 per second or so).
    any Idea?

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

    @Dick what numbers is it logging?

    DickD 1 Reply Last reply
    0
    • mfalkviddM mfalkvidd

      @Dick what numbers is it logging?

      DickD Offline
      DickD Offline
      Dick
      wrote on last edited by
      #5

      1 to 100 depends on the light intencity and it changes the value with more and less light.

      mfalkviddM 1 Reply Last reply
      0
      • DickD Dick

        1 to 100 depends on the light intencity and it changes the value with more and less light.

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

        @Dick Isn't that what you want?

        DickD 1 Reply Last reply
        0
        • mfalkviddM mfalkvidd

          @Dick Isn't that what you want?

          DickD Offline
          DickD Offline
          Dick
          wrote on last edited by
          #7

          that is what I want but it continue with logging (> 1000 per minute).So the sensor is very busy with the LDR only. a delay should be the best or your solution of 5% difference.

          mfalkviddM 1 Reply Last reply
          0
          • DickD Dick

            that is what I want but it continue with logging (> 1000 per minute).So the sensor is very busy with the LDR only. a delay should be the best or your solution of 5% difference.

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

            @Dick does the number vary wildly even if the same amout of light is shining on the ldr?

            DickD 1 Reply Last reply
            0
            • mfalkviddM mfalkvidd

              @Dick does the number vary wildly even if the same amout of light is shining on the ldr?

              DickD Offline
              DickD Offline
              Dick
              wrote on last edited by
              #9

              no it is steady with the same amount of light, changing it it keeps steady on the new value but with a hi speed logging. , I checked it just now. The LDR is connected to the +5v and A0 with a resister of 10k to gnd.

              mfalkviddM 1 Reply Last reply
              0
              • DickD Dick

                no it is steady with the same amount of light, changing it it keeps steady on the new value but with a hi speed logging. , I checked it just now. The LDR is connected to the +5v and A0 with a resister of 10k to gnd.

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

                @Dick now I see the problem! There are two Serial.println(lightLevel);

                Remove the Serial.println(lightLevel); that sits just before the if clause.

                1 Reply Last reply
                0
                • DickD Offline
                  DickD Offline
                  Dick
                  wrote on last edited by
                  #11

                  YES yes yes, I did not see that one. Your solution is working perfect also with the difference in light (5%).

                  Thank you for the support and have a nice weekend

                  mfalkviddM 1 Reply Last reply
                  1
                  • DickD Dick

                    YES yes yes, I did not see that one. Your solution is working perfect also with the difference in light (5%).

                    Thank you for the support and have a nice weekend

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

                    @Dick you're welcome, the same to you
                    Back to buildning lighting for my wife's makeup mirror :)

                    DickD 1 Reply Last reply
                    0
                    • mfalkviddM mfalkvidd

                      @Dick you're welcome, the same to you
                      Back to buildning lighting for my wife's makeup mirror :)

                      DickD Offline
                      DickD Offline
                      Dick
                      wrote on last edited by
                      #13

                      good luck and i advice you to do it wll otherwise you have an issue:sweat:

                      1 Reply Last reply
                      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
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      35

                      Online

                      12.0k

                      Users

                      11.2k

                      Topics

                      113.4k

                      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