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

Slides From NoVA Mini Maker Faire – Meet Gadgeteer

http://1drv.ms/1xrVEjE

This weekend, I had the privilege of participating in my very first maker faire, the NoVA Mini Maker Faire, which was held in Reston, VA.

I signed up for a booth which I called “Meet Gadgeteer: Reusable Modular Electronics” which was intended to highlight the advantages of the .NET Micro Framework and .NET Gadgeteer as a means of creating electronic prototypes and IoT devices. I created a rolling slide deck for the event, which I’ve embedded above. You can also download a copy using the link above.

Continue reading Slides From NoVA Mini Maker Faire – Meet Gadgeteer

Security for IoT Can’t Be an Afterthought

Earlier this week, in my presentation at CapArea.net on “Communicating with the Internet of Things” one of the points I emphasized repeatedly is the necessity to think about security early and often. Any time you are responsible for creating a device that can communicate with the internet, whether that be a home automation gateway, Wi-Fi-controlled light bulb, or and industrial control system designed for remote monitoring, you need to be sure you understand how that system can be attacked. As security MVP Troy Hunt likes to put it, you need to “hack yourself first.”

598413_99638977_Hacker_sm_5fd3b71b-07bc-4df3-bede-0c3250304c9e
photo credit: nwogen on freeimages.com

Continue reading Security for IoT Can’t Be an Afterthought

Slides for "Communicating with the Internet of Things"

UPDATE: Forgot to mention that if you want to keep up with my hardware projects, I post video demos to my Devhammer Vimeo channel. You can also see info on some of my past projects on the Garage page on my blog.


Thanks to all the folks who came out to hear my talk last night at CapArea.NET on “Communicating with the Internet of Things”. I’m embedding my slides from the talk below, including some additional resource links:

Continue reading Slides for "Communicating with the Internet of Things"