Microsoft on How to Create a security system with cameras on your Windows IoT Raspberry Pi
Last time I wrote about getting started using a Raspberry Pi and Windows Internet Of Things. This time I played around with adding USB Web cameras to the Raspberry Pi.
The code below will dynamically check for cameras as they get connected and disconnected from the device. It runs on Windows IoT, so works on a PC, Raspberry Pi, Windows Phone, Xbox.
The code has a timer that checks for cameras and takes a picture every tick, defaulting to 7 seconds. If there are multiple cameras, it will alternate cameras. I’ve had a Pi going with 4 USB cameras and a touchscreen display from a single 5V power supply, continuously taking pictures for weeks.
I noticed after a while that the clock would drift. After a many hours of taking pictures, the time might be off by several minutes. A little research showed that the Pi does not have a Real Time Clock (the electronic equivalent of a wrist watch). Because it can easily connect to a network, I added some code I found to look up the current time on the network. This code conditionally runs on the Pi. On other devices, it just uses the host OS time function.
Read the entire article here, Create a security system with cameras on your Windows IOT Raspberry Pi – Calvin Hsia’s WebLog
via the fine folks at Microsoft