• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MMM-PIR-Sensor wont do anything

Scheduled Pinned Locked Moved Troubleshooting
2 Posts 1 Posters 1.2k 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.
  • T Offline
    TS77UK
    last edited by Jan 29, 2018, 9:46 PM

    This is really bugging me! Ok, I am new to Pi programming but I have knowledge of a few programming languages and can usually tweak my head around problems but this has really stumped me!

    I turned the PIR sensor away from me to show no movement. When I use “sudo ./test.sh” I get a load of 0’s on the screen displaying no movement. When I wave my hand in front I get a load of 1’s. So its working correctly.

    I setup MMM-PIR-Sensor and change the pin from default to number 7 in the config file. Nothing happens on the screen. It doesn’t switch off when it senses no movement (like its supposed to)

    This is my test.sh code (which works):

    echo "4" > /sys/class/gpio/export
    echo "in" > /sys/class/gpio/gpio4/direction
    
    while true;  do
            trap 'echo "4" > /sys/class/gpio/unexport' 0
            stat=`cat /sys/class/gpio/gpio4/value`
            echo $stat
    
    done
    exit 0
    

    And my config code:

    {
    module: 'MMM-PIR-Sensor',
    config: {
    sensorPIN: 7 
    }
    },
    

    I just know its something simple but I am stumped!

    1 Reply Last reply Reply Quote 0
    • T Offline
      TS77UK
      last edited by Jan 29, 2018, 9:53 PM

      @TS77UK said in MMM-PIR-Sensor wont do anything:

      echo “4” > /sys/class/gpio/export

      Ignore that! I was looking at the wrong pin map for my model Pi! I should have been in number 4 not 7! As soon as I typed it I realised the answer lol

      Thank you for your time

      1 Reply Last reply Reply Quote 2
      • 1 / 1
      1 / 1
      • First post
        2/2
        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