A Beginner’s Developer Guide To The Internet Of Things

Let’s get started.

Internet of things is physical devices, vehicles, buildings, and other items embedded with electronics, software, sensors, actuators, and network connectivity that enable these objects to collect and exchange data.

What is important to know is that IoT is a transformation era in Information Technology. In the future connected devices will not be called IoT, connectivity of the device will be a natural part of the device character.

We will cover five basic but important areas:

  1. Hardware
  2. Software & Programming
  3. Connectivity
  4. Security
  5. Cloud

This will be an easy way to have a basic fundamental understanding of Internet Of Things.

1. Hardware

Welcome to the jungle. Navigating through the hardware jungle could be difficult. There is two hardware options I recommend to start your IoT-developing journey.

Adafruit Feather HUZZAH ESP8266

The ESP8266 is a microcontroller. A microcontroller is a simple computer that can run one program at a time, over and over again. Very easy to use and fast processing time.

They memory of the microcontroller is pretty small, so an operating system won’t fit. But on the other hand, directly executing simple code is easier, and is accomplished with no operating system overhead.

The board is best used for simple repetitive tasks: opening and closing a garage door, reading the outside temperature and reporting it to Twitter, driving a simple robot.

The pins are your way from the physical world to the Internet. Use the pins to connect your sensor, activate motors and so on.

- Connectivity

WiFi 802.11b/g/n

- Power

There’s two ways to power a Feather.

You can connect with a MicroUSB cable (just plug into the jack) and the Feather will regulate the 5V USB down to 3.3V.

You can also connect a 4.2/3.7V Lithium Polymer (Lipo/Lipoly) or Lithium Ion (LiIon) battery to the JST jack. This will let the Feather run on a rechargable battery.

Raspberry Pi 3 Model B

A Raspberry Pi is a general-purpose computer, usually with a Linux operating system, and the ability to run multiple programs. It is more complicated to use than an Arduino.

As you se can on the picture, the Raspberry have 4 USB ports, a HDMI out and an ethernet port.

Plug in a keyboard and monitor, load up Raspbian, and you are ready to go! The Pi is an incredibly powerful platform in a very small package — perfect for embedded systems, or projects requiring more interactivity and processing power.

- Connectivity

Ethernet, WiFi and Bluetooth.

- Power

MicroUSB Cable, 5V

2. Software & Programming

There is different programming languages depending on which microprocessor you use. But common one is the C programming language. The language is used to program the Adafruit Feather Huzzah. C programming is really fast and great for microprocessors. It is about as close as you can get to assembly.

To write and upload your C code to the Adafruit, you need some software. To get started i would recommend Arduino IDE.

I would recommend to load the micro SD card with the operative system Raspbian (Unix-like based OS), follow the instructions and it will guide you through the install.

I would recommend to connect your Pi to a monitor, a keyboard and a mouse, and program directly on the device. To access the Raspberry Pi Pins, python programming language works fine.

3. Connectivity

Connectivity, it is one of the main things to keep in mind while developing any Internet of Things (IoT) project. Security, power demands and battery life will dictate the choice of one or some form of combination of technologies.

There is a few questions you need to consider on any new IoT project.

  • How do I want the device be connected?
  • Is there any power or range constraints?
  • How much data rate is needed for the data transfer?
  • What network infrastructures are currently available?

Here a few Protocols you will need to know.

Bluetooth

Smart Bluetooth Low Energi (BLE) is great for low power consumption.

  • Standard: Bluetooth 4.2 core specification
  • Frequency: 2.4GHz (ISM)
  • Range: 50–150m (Smart/BLE)
  • Data Rates: 1Mbps (Smart/BLE)

ZigBee

  • Standard: ZigBee 3.0 based on IEEE802.15.4
  • Frequency: 2.4GHz
  • Range: 10–100m
  • Data Rates: 250kbps

WiFi

  • Standard: Based on 802.11n (most common usage in homes today)
  • Frequencies: 2.4GHz and 5GHz bands
  • Range: Approximately 50m
  • Data Rates: 600 Mbps maximum, but 150–200Mbps is more typical, depending on channel frequency used and number of antennas (latest 802.11-ac standard should offer 500Mbps to 1Gbps)

LoRaWAN

Recently a lot of hype concerning this protocol. Great for long distance.

  • Standard: LoRaWAN
  • Frequency: Various
  • Range: 2–5km (urban environment), 15km (suburban environment)
  • Data Rates: 0.3–50 kbps.

4. Security is key

Have you recently heard about the IoT-cameras that took part in a vicious DDoS attack? Well i can tell you that those cameras were rubbish, and the people that developed the system did not think about security for a second.

One of the keys to a great IoT system is security. The devices will collect a lot data about us, and that is why privacy is crucial. As an IoT-developer you will need to think about the function of the device and even eliminate some functions that is “fun to have” but could be a security breach if not looked upon.

You will need to consider how your device would be attacked and what security flaws it has.

I would recommend to start with the messaging protocol. One of the commonly used messaging protocol is MQTT. If wrongly used, your messages will be easy readable by hackers.

MQTT relies on TCP as transport protocol, which means by default the connection does not use an encrypted communication. To encrypt the whole MQTT communication, many MQTT brokers allow to use TLS instead of plain TCP.

Port 8883 is standardized for a secured MQTT connection. The standardized name at IANA is “secure-mqtt” and port 8883 is exclusively reserved for MQTT over TLS.

Authorization and Authentication as MAC-Address, Token, Username and password is great for device management and incoming data transfer to the cloud. If available, i strongly recommend you to use it.

5. Cloud

The device will be collecting a lot of data. And you will have to manage, process, analyze, monitor, store, use machine learning on it and even distribute the data to other services. Let me introduce you to the cloud!

The cloud could be your best friend or your worst enemy, that is why you will need to choose your cloud service with care.

You will need to consider this questions when looking at a cloud provider.

  • Device compatibility, messaging protocol compatibility
  • Security — Authentication and Authorization, Management of development team/devices
  • Scalability
  • Storage — Databases
  • Privacy — Where is the data stored

Also look at pricing and trial time. Sometimes free demo time of the service is all you need to have a proof of concept.

Let’s talk about the cloud titans

Amazon Web Service — AWS IoT Platform

AWS IoT enables secure, bi-directional communication between Internet-connected things (such as sensors, actuators, embedded devices, or smart appliances) and the AWS cloud over MQTT and HTTP.

IBM Bluemix — IoT Platform

Devices and applications communicate with the MQTT broker using the MQTT protocol, as shown:

I have personally used Bluemix and 30 days trial was great for creating a proof of concept for our project.

Microsoft Azure — IoT Hub

  • Provides multiple device-to-cloud and cloud-to-device communication options, including one-way messaging, file transfer, and request-reply methods.
  • Provides built-in declarative message routing to other Azure services.
  • Provides a queryable store for device metadata and synchronized state information.
  • Enables secure communications and access control using per-device security keys or X.509 certificates.
  • Provides extensive monitoring for device connectivity and device identity management events.
  • Includes device libraries for the most popular languages and platforms.

Thanks for the read, and hopefully my knowledge will increase and I will be able to write A Professional’s Developer Guide To The Internet of Things

Interested in more of what Sweden has to offer the IoT-market? Please check out my website, where I write about IoT-Tech from Sweden: http://www.iotversum.se

I am a 23 year old tech-lover and I am soon to be an IoT-developer. Further interests are: Machine learning, AI, self-driving cars and robotics.

I am currently looking for a summer internship, please let me know if there is an opportunity at your company for a passionate IoT-developer.

For further contact please add me on LinkedIn or send me an email.
My email is poja@iotversum.se

// Poja Shad

Like what you read? Give Poja Shad a round of applause.

From a quick cheer to a standing ovation, clap to show how much you enjoyed this story.