Thread.Sleep equivalent in UWP

Wanted to share a quick solution to an issue I ran into while working on a Universal Windows Platform (UWP) app for my Raspberry Pi 2.

Background

I was building an app to read sensor data from a .NET Gadgeteer TempHumidity module using the GHI Electronics FEZ Cream, which is a HAT (Hardware Attached on Top) for the Raspberry Pi 2 that allows the use of Gadgeteer modules. In my case, I’m running Windows 10 IoT Core on my Pi 2, so that I can stick with programming in C#. The original driver included a call to Thread.Sleep, which it turns out is not available in a UWP app.

For Gadgeteer modules that are directly supported (i.e. with drivers that have already been ported to work with Windows 10 IoT Core), integrating them into a UWP project is as simple as downloading the relevant NuGet packages. However, in my case, it turned out that the temperature and humidity sensor I was using was an older model which was not directly supported. The good news is that since GHI makes their Gadgeteer mainboard and driver code available on Bitbucket, it was easy to find the driver code for the sensor I’m using and work on a port to work on the Pi. Continue reading Thread.Sleep equivalent in UWP

Protocol Activation: What Is It, What Apps Offer It, and How Can I use It in My Apps?

TL:DR

Protocol activation is a cool feature you can add to your Windows Store apps, and allows you to make your app more useful as well as more discoverable. For a video demonstration of how easy it is to add protocol activation to your app, skip to the end of the post. Otherwise, read on…

Continue reading Protocol Activation: What Is It, What Apps Offer It, and How Can I use It in My Apps?

Everything You Ever Wanted to Know About Windows 8 Game Development…

…but didn’t know to ask.

OK, perhaps not everything…but certainly all the options for developing great games on Windows 8.

Bob Familiar, who manages some of my fellow Technical Evangelists on our East Region team, managed to find time between updating SharePoint and emailing Excel files to do some really thorough research on the state of game development for Windows 8, and shares his results on his blog:

Continue reading Everything You Ever Wanted to Know About Windows 8 Game Development…

Source Code Available for the Kinect Mouse Cursor Project

Getting the Code

Last week, I noted the release of the Kinect SDK for Windows beta, and at the end of the post pointed to some cool projects put together by the folks over at Coding4Fun on Channel9. One of the projects I’ve been playing with a bit is the Kinect Mouse Cursor project, which at the time of my post last week was only available in binary form. Continue reading Source Code Available for the Kinect Mouse Cursor Project