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

drwindows/dotnet-iot-homebear-tilt

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HomeBear.Tilt

Windows 10 IoT Core UWP app proof-of-concept that works great with the Pimoroni Pan-Tilt HAT (PIC16F1503). The app is in a final state. No maintenance effort planned.

Build status

Service Result
Continious integration Build Status
Static code analyse Quality Gate Status

Prerequirements

How it looks

On-device

Features

Overview

  • Pans
  • Tilts
  • Camera preview
  • Take camera snaphots
  • Follows detected faces
  • Gamepad support
  • Controls LEDs

Camera

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 tilt-able by the servos.

Camera

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.

File explorer

Face detection

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.

Gamepad support

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.

LED controller

To assemble the LED strip I have to learn solidering first. I'll update the app after I earned this skill.

Usage

Connect all USB devices like the camera or the gamepad to the Pi. Check if all devices are listed at the dashboard "connected.

Dashboard

Start the app from the Device Portal's App Manager or via a Visual Studio debug deployed session.

Keep in mind

This a 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>

Information

Most of the HAT logic is based on the offical Python libraries.

Known issues

  • 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

Ideas for the future

  • Connect to Azure IoT Hub
  • Add Azure Blog Storage for uploading detected faces

Contributing

Feel free to improve the quality of the code. It would be great to learn more from experienced C#, UWP and IoT developers.

Authors

Just me, Tobi.

Thanks to

License

This project is licensed under the MIT License - see the LICENSE file for details. Dependencies or assets maybe licensed differently.

About

Windows 10 IoT Core UWP app that works great with the Pimoroni Pan and Tilt HAT (PIC16F1503)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 100.0%