MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    PIR-Sensor detecting motion even when there's no movement

    Scheduled Pinned Locked Moved Troubleshooting
    2 Posts 2 Posters 1.9k Views 1 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.
    • MitchfarinoM Offline
      Mitchfarino Module Developer
      last edited by paviro

      Hi All

      I’ve just hooked up my PIR sensor to my Pi3

      I ran a variant of this, and it was constantly detecting movement even when I was covering it up, so nothing should have been detected.

      Is there an issue with my sensor? Or is that standard? Or can I turn down the sensitivity in some way?

      import RPi.GPIO as GPIO
      import time
      GPIO.setwarnings(False)
      GPIO.setmode(GPIO.BOARD)
      GPIO.setup(3,GPIO.OUT)     #Define pin 3 as an output pin
      
      while True:
              GPIO.output(3,1)   #Outputs digital HIGH signal (5V) on pin 3
              time.sleep(1)      #Time delay of 1 second
      
              GPIO.output(3,0)   #Outputs digital LOW signal (0V) on pin 3
              time.sleep(1)      #Time delay of 1 second
      

      Edit from admin: Please use Markdown on code snippets!

      1 Reply Last reply Reply Quote 0
      • KirAsh4K Offline
        KirAsh4 Moderator
        last edited by KirAsh4

        I don’t have a PIR sensor to fiddle with … however, why are you setting pin 3 HIGH, and as an OUTPUT? If it’s to power the PIR sensor board, don’t, use either pin 1 or 17, those have a constant 3v3 on them (or if you know your sensor can tolerate 5V, use pins 2 or 4). If it’s to read from the PIR sensor, it needs to be set as an INPUT pin so it can detect when the sensor triggers it.

        A Life? Cool! Where can I download one of those from?

        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
        Enjoying MagicMirror? Please consider a donation!
        MagicMirror created by Michael Teeuw.
        Forum managed by Sam, technical setup by Karsten.
        This forum is using NodeBB as its core | Contributors
        Contact | Privacy Policy