Skip to content
This repository has been archived by the owner on Jan 3, 2020. It is now read-only.

PirSensor Event Handler not invoked #4

Closed
baqwas opened this issue Feb 23, 2017 · 3 comments
Closed

PirSensor Event Handler not invoked #4

baqwas opened this issue Feb 23, 2017 · 3 comments
Assignees

Comments

@baqwas
Copy link

baqwas commented Feb 23, 2017

I'm unable to get the motionDetected event handler invoked when there is motion in front of the HC-SR501 (PIR) sensor. I have used ms-iot examples for the PirSensor class and in a separate test cloned the GpioInterrupt example without any success. The same breadboard layout works fine with the equivalent (i.e. interrupt handling) in C++ and Python by swapping out the SD card. I have tried GPIO pins 26 and 6 (BCM numbers) without success for the sensor but Blinky (with the Timer event) works fine on these two pins.

I have tried the sensor with ActiveHigh and ActiveLow settings. For this particular model, ActiveHigh is the correct setting because that is the interpretation that I have in my test cases under Raspbian Jessie.

Any guidance available on debugging the GpioPinValueChangedEvent for a newbie user?

My W10 IoT Core tests have failed with five different HC-SR501 sensors and yet all of these work fine. Arduino Wiring will be my next test (since regular Arduino with interrupt handling is working fine) but some feedback on board level interrupt handling would be good education for me.

Thanks.

@IoTGirl
Copy link

IoTGirl commented Feb 23, 2017

Hi BaqWas,
Have you looked at other IoT Core projects in the community that use a motion sensor? I did a quick search and found http://www.slideshare.net/andri_yadi/raspberry-pi-2-windows-10-iot-core-nodejs and they show a wiring diagram on slide 36 that might help. If you scroll through the slides further they also have a GitHub that you might leverage.
Sincerely,
IoTGirl

@baqwas
Copy link
Author

baqwas commented Feb 23, 2017 via email

@saraclay
Copy link

Closing this issue out as recent updates may have fixed this. If this is not the case, please file this issue at: www.github.com/MicrosoftDocs/windows-iotcore-docs

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants