Add support for attached motion sensor on GPIO#34
Add support for attached motion sensor on GPIO#34pieter wants to merge 1 commit intobrutella:masterfrom
Conversation
|
That looks great. I do have a HC-SR501 IR motion sensor. Hopefully I can test the pull request asap. |
This assumes running on Raspberry Pi, using an HC-SR501. This device outputs a HIGH signal when motion is detected, or a low signal when no motion is detected after a certain delay. Can be set by specifying --motion-pin to the GPIO pin on the raspberry to which the HC-SR501 data pin is connected. Implements brutella#5
667ac5b to
8a12572
Compare
|
FYI I tested this change today with an actual sensor, and the motion device in Homekit worked perfectly. |
|
Hello I'm new here but find the hkcam project very intreresting. The connections between the Pi and RCWL-0516 are as follows. More infos on how to connect this motion detector can be found here |
| if err != nil { | ||
| log.Info.Panic(err) | ||
| } | ||
| pin := rpio.Pin(10) |
There was a problem hiding this comment.
I think that must be:
| pin := rpio.Pin(10) | |
| pin := rpio.Pin(motionPin) |
|
Is there any way to get this PR approved and documented a little? It's exactly what I'm looking for |
I don't know Go so I don't really know what I'm doing. Also I don't have a HC-SR501 myself yet, so this is more theoretical, but figured it might be useful for some.
This assumes running on Raspberry Pi, using an HC-SR501. This device
outputs a HIGH signal when motion is detected, or a low signal when
no motion is detected after a certain delay.
Can be set by specifying --motion_pin to the GPIO pin on the raspberry
to which the HC-SR501 data pin is connected.
Implements #5