Recently I got my hands on a HC-SR501 infrared sensor. So it was time to build something with it. I thought this sensor, an RGB LED and my D-Link DCS-932L WLAN camera would make a security system.
Combined with the Raspberry Pi, Windows 10 IoT and some C# Code, this should take more or less no time to build it.
Well, to be honest, it was faster and easier to build it as to describe it here;)
So, let's grab a breadboard and use the image below to connect everything together:
Infrared sensor: RGB Led
5V 5V - Pin2 V,B 5V - Pin2
Center Pin GPIO 06 - Pin31 R GPIO23 - Pin16
GND GND - Pin6 G GPIO24 - Pin18
The second LED (the red one) is just to have a control that everything is correct and is not actually required. Now fire VS2015 and create a new universal app, paste the code from the code section and give it a go on your device. If everything is correct you will see a green light, if you move the light will switch to red. if you have a camera on your network use the IP address for your camera and it should take an image, which you should see on the monitor connected to your Raspberry Pi.
Comments