Software apps and online services
HomeBear.Tilt is a proof-of-concept on how to control the Pimoroni Pan-Tilt HAT (PIC16F1503) using a UWP running on Windows 10 IoT Core. Written in C#.
I wanted to play around with the built-in face detection feature and how it performs on a $35 computer.
The app also allows to control the pan and tilt arm using buttons or using a wired XBox 360 compatible controller.
- Windows 10
- Visual Studio 2019
- Raspbbery Pi 3 (B) with Windows 10 IoT Core 17763 or higher
- Pimoroni Pan-Tilt HAT
- (optional) Webcam (Supported devices)
- (optional) Wired XBox 360 controller
- Pans the arm
- Tilts the arm
- Camera preview
- Takes camera snaphots
- Follows detected faces (horizontal axis)
- Gamepad support
Windows 10 IoT Core does not support the camera interface of a Raspberry Pi (CSI). I choose a Logitech CS270 HD Webcam (Amazon).
The casing had to be removed to make it light enough that the camera will be pan- and tiltable by the servos.
Taking camera snapshots
The apps takes on button press snapshots of the current camera preview. The images will be stored in the Pictures library folder of the Windows 10 IoT Core system.
To access the images from another computer open the Device Portal Website and use the File explorer to download the images.
To detected faces, the app will use the built-in face detection feature of the Windows.Media.Core package.
The media capture processing capabilities of a Raspberry Pi 3B seems to be not very performant. The detection is slow but works in good light condition.
According to the Microsoft Technet, Windows 10 IoT Core does not work well with the Bluetooth based XBox One gamepad.
The XBox 360 gamepad should work wired or using the Wireless receiver. The receiver lost the connection to the Pi after the app has been started. A USB-wired gamepad works as expected.
Connect all USB devices like the camera or the gamepad to the Pi. Check if all devices are listed at the dashboard "connected.
Start the app from the App Manager or via a Visual Studio debug session.
This is a learning project
This is a proof-of-concept app that's purely build for having fun! All features have room for improvements or could harm the hardware.
Auto. granted permissions and capabilities
The system will access your web camera, microphone and photo lib capabilities.
<Capabilities> <Capability Name="internetClient" /> <uap:Capability Name="picturesLibrary"/> <DeviceCapability Name="webcam"/> <DeviceCapability Name="microphone"/> </Capabilities>
- Reading of pan and tilt angles are (slightly) off the actual value.
- The servos sometimes start to buzz quite heavily.
- The webcam could flicker on the x, y middle.
- The gamepad could be interpreted as touch that selects buttons.
- Connect to Azure IoT Hub
- Add Azure Blog Storage for uploading detected faces