Tutorial 7: The Internet of Things

The Internet of Things (IoT) is a powerful tool that can connect machines to achieve a particular function. This has a strong overlap with robotics and artificial intelligence. It often uses low power micro-controllers that can have a range of sensors and be able to control switches, lights, motors etc. They can be used in the home and even in cities often called smart homes/cities.

Hardware

For the majority of this tutorial we will be using the Arduino Nano 33 IoT board. Other components you will need include:

  • breadboard (half size)
  • traffic lights LED (three coloured LED module)
  • jumper wires (male-to-male)
  • button (tactile push button)
  • pot (variable resistor)

Later on we may well introduce more components that you might find useful. You can use any computer for this, windows PC/laptop, linux PC/laptop or Mac/MacBook, Chromebook or even a Raspberry Pi.

Arduino Nano 33 IoT

Software

To develop your IoT projects, you will need to use the Arduino Cloud. Here, you can add devices, create things, and dashboards with lots of widgets. If this sounds like gobbledygook, then all will be made clear as you download the PDFs below and work through the tutorial. Some of the first modules are a repeat of the robotics tutorial, but I have included them in case you have jumped straight to this place.

You will need to sign up for an account. You will need to use the Chrome web browser (others may work, but some don’t). It goes without saying that you need Wi-Fi (the name and password) before you begin. If you have everything, you are ready to go.

Module A

Getting to know your Arduino Nano 33 IoT, covering the basics and exploring its potential using additional components: traffic light LEDs, button, pot, and the internal IMU.

Module A Unit #1 hardware

An introduction to the hardware you will need to get you started on your journey into the world of The Internet of Things.

Module A Unit #2 software

Setting up the software to start your coding with the Arduino Nano 33 IoT device.

Module A Unit #3 blinking

Delving into your first sketch with a blinking LED.

Module A Unit #4 functions

Creating and using your own functions.

Module A Unit #5 boolean

Blinking without delay, how to use boolean expressions.

Module A Unit #6 random & arrays

Arrays are a vital part of coding and this introduces you to the concept.

Module A Unit #7 three LEDs

Exploring how you might code all three LEDs using for() loops.

Module A Unit #8 the button

This is a short unit, it should be easy but it is far from straightforward, let’s bounce.

Module A Unit #9 the pot

Using a variable resistor (pot for short) we can control the LEDs.

Module A Unit #10 the IMU

The Arduino Nano 33 IoT has a built-in accelerometer and gyroscope.

Module B

Let’s start building the Internet of Things…

Once we have got to know our Arduino Nano 33 IoT board we can now start to use it for what it was designed for, the Internet of Things. we are going to build a variety of applications to give you some flavour of what you can do with it. Bear in mind that it takes a bit of practice to get to grips with the process, the more you practice the more intuitive it will become.

Module B Unit #1 your first Thing

We will start with something a simple as possible, switching an LED on and off. That may not sound demanding but there are quite a number of hoops to jump through, so one step at a time.

Module B Unit #2 fade LED

In this example we use widgets to fade and brighten an LED.