How Cold is it, Right Now?

Description

Luis Valencia, Microsoft MVP, has written up a great IoT project that seems to be perfect right now (Man, it's cold! ;)

First we have a short interview of him at the recent MVP Summit;

Luis Valencia - IoT, sensors, and Azure

Now onto the full project...

Real Time Temperature WebApp with Raspberry, Azure IoT Hub and SignalR

 

"The IoT is exploding  – and everybody is talking about it; Twitter feeds are buzzing, and blog posts are flooded with information. However, for many of us mere mortals, it looks like rocket science.

In this post, I will try to make it easy for you to understand the basic concepts and technology behind the scenes. I will also build a fully functional sample web app, where you can see the end result and how all the pieces are connected.

So, what is the IoT? You will probably find different explanations, but for me, the best explanation is:

The IoT comprises of things or devices that are connected to a network; they produce or receive data, and then perform actions based on it.

Let’s take a Temperature Sensor as a simple example. In this scenario, this particular sensor sends data to a website in real-time. It is connected to a refrigerator in a drugstore, which by law needs to have  controlled temperature. Rather than employing a person to go to the refrigerator every 30 minutes to take note of the current temperature, write it down manually on a piece of paper, and then save the evidence that the temperature has been written down for 24 hours, the sensor does it all automatically.

The IoT enables new business scenarios, new products, new services, and–just like the one I am going to show–there are hundreds out there already in production. And it’s really not rocket science.

What will you need to complete this?

The first thing to have is the THING, or a device. In my case I have Raspberry PI 3; this is a $39.99 dollar computer to which we can connect devices and then create applications that interact with those devices or sensors.  Here I also have BPM180 Sensor, which you can find on Amazon for $9 or $10.  This sensor measures temperature in real time. Later you will learn how to show it in real-time in a web application.

The Raspberry PI 3 comes by default with Raspbian installed. This is a Linux based OS based on Debian, however you can install Windows IoT Core. This is a minimum footprint version of the Operating System. What is amazing about this OS is that you can create apps with the tools you already know and love — yes, Universal Windows Platform Apps will run on IoT Core, as well as Windows 8 or Windows 10, with the same programming language you already know, C#.

There are APIs out there to create apps in Javascript or other languages, but for simplicity I will just show the C# code.

Moving Parts of Our Solution

The PI APP...

IoT Hub ...

Azure Web Job ...

SQL Server ...

Web App ...

...

And the end result is a dashboard which shows the temperature in real time, like this screenshot demonstrates:

image

..." [Click through to read it all]



Tags:

Azure, Coding4Fun, IoT

The Discussion

Add Your 2 Cents