Internet Switch

In order to truly understand the potential of IoT, we are going to take a start with building an internet switch. In this tutorial, we will use the esp8266 module and we will build an app with Grandeur to control the on-board LED of esp8266 module over internet. This is one of the core use cases of IoT and can be extended for applications where control of a device or appliance is required over internet.

Things used in this project

In this tutorial we are following hardware and software components and services:

  1. NodeMCU 1.0: ESP12-E
  2. Visual Studio Code
  3. Grandeur CLI
  4. Grandeur

Setting up the environment

The first step is really just setting up the environment so that we could write code and program our hardware.

Install Visual Studio Code

VS code is an extremely powerful code editor. It is the IDE of choice for millions of developers all over the world. Microsoft initially launched it in 2015, but it is now open-source and backed by a vibrant community of developers globally. You can go to https://code.visualstudio.com/download and download the binary of VS code for your platform (Windows, Linux, or MacOS).

Install Grandeur CLI

For this tutorial we are using Visual Studio Code with Grandeur CLI. Though it is not recommended, but alternatively you can also use Arduino IDE (https://www.arduino.cc/en/software/). We are using Grandeur CLI here because it is minimal and works really well with VS code. Arduino IDE is a software from 2000s. The VS code + Grandeur CLI combo provides much better coding experience than Arduino IDE.

You can download the Grandeur CLI binary through https://github.com/grandeurdev/cli/ After downloading, simply extract the grandeur.exe in a folder and include the folder in your path from the system environment variables.

For instance, I created a directory for Grandeur CLI in C:\\Program Files\\ and added it to my path.