IoT with Visual Basic

CodeGuru content and product recommendations are editorially independent. We may make money when you click on links to our partners. Learn More.

Introduction

My friend and I had an interesting conversation a couple of weeks ago. We spoke about the advancement of technology and how we are so fortunate to live in this day and age. Who would have thought that Back to the Future 2 and the Terminator franchise would be playing out during our lifetime? Okay, perhaps that’s a bit far fetched, but is it really?

Maybe I am too excited about the prospects of living in a 100% percent connected world where every electric appliance can communicate with one other. Add to this fact that the Microsoft Bot Framework knows your online activities better than what you may realize.

Bots

A bot, or Web robot, is the most common bot system. A Web robot is an application that can run automated tasks. These tasks are usually structurally repetitive and bots can perform these tasks much faster than humans. Because of the speed at which bots can perform tasks, they also can be implemented where response speed is faster than how a human can respond and process information.

Bots also can be used to emulate human activity. An example of this is a chat bot similar to IRC and IM. Bots also have the ability to mimic human conversation. Wikipedia explains bots much better than I can…

The Microsoft Bot Framework

The Microsoft Bot Framework is a communication service that helps connect your Bots with different communication channels, such as SMS and email. If you, for example, write a conversational Bot that exposes a Microsoft Bot Framework-compatible API on the Internet, the Microsoft Bot Framework Connector will forward messages from your Bot to a user, and also send user messages back to your Bot.

Google

A month or so ago, I was 1200 Kilometers from home, for work purposes, with colleagues. About half way home, we stopped and had something to eat. I had an application on my smartphone called ‘Allo’ from Google. I demonstrated to one of my colleagues how it worked: Basically, I opened it up and typed in how many kilometers to go to my home. It immediately told me the number of kilometers, which was 604. I did another test and requested where the closest restaurant was in this strange place. It not only gave the restaurant’s name, it also gave me directions.

Now, how did ‘Allo’ know these facts? Because of my search preferences in Google as well as my location setting were active on my Android phone. Okay, I know Google and Android are not the topic here, but I thought it would be a good explanation of how Bots work.

Facebook

Ever noticed how Facebook also knows which Web sites you have visited? That’s quite easy to prove: Go on Google and search for a guesthouse, for example. A day (give or take) later, you will be greeted with either a Page Suggestion for the guesthouse you have searched for, or the guesthouse’s ad will pop up.

This is the magic of Bots!

Apart from Bots, Virtual Reality and Augmented Reality are becoming more and more popular. The first thought that comes to my mind when I hear Virtual Reality is a move named Demolition Man starring Sylvester Stallone, Wesley Snipes, and Sandra Bullock—that was my first ‘encounter’ with VR.

Look at Pokemon Go. Although the craze has settled, the benchmark has been set by Nintendo. It is just a matter of time when AR and VR will be as common as cell phones.

Look at me going on and enjoying the sound of my smooth baritone voice. Today’s topic is IoT with Visual Basic and I will try to make your progression into it a bit easier.

Internet of Things

In a nutshell: The Internet of things (IoT) is the internetworking of any physical devices (including vehicles and buildings) simply called smart devices. These devices are embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data. More information on IoT can be found here:

IoT1

Windows 8.1 has the following UWP Project templates:

  • Class Library
  • Windows Runtime Component
  • Unit Test App

IoT2
Figure 2: Windows 8.1 IoT Templates

For a full list of Windows 8.1 and Windows 10 UWP Project templates, have a look here:

Go beyond “Blank App” with these Windows 10 VS 2015 Project Templates

15 Visual Studio Project Templates To Jump Start Your Code

Deployment: Deploying an App with Visual Studio

Raspberry: Building Visual Studio Code on a Raspberry Pi 3

Conclusion

This article’s purpose was to introduce you to the world of IoT with Visual Studio 2015 as well as all the options available to you.

Hannes DuPreez
Hannes DuPreez
Ockert J. du Preez is a passionate coder and always willing to learn. He has written hundreds of developer articles over the years detailing his programming quests and adventures. He has written the following books: Visual Studio 2019 In-Depth (BpB Publications) JavaScript for Gurus (BpB Publications) He was the Technical Editor for Professional C++, 5th Edition (Wiley) He was a Microsoft Most Valuable Professional for .NET (2008–2017).

More by Author

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends & analysis

Must Read