Project 4-IoT-Internet of Things



Organizations need to be able to incorporate and deal with the Internet of Things (IoT) as this technolgy becomes pervasive.
This project will introduce Single Board Computers (SBC) in the form of a Raspberry Pi, and microcontrollers in the form of an Arduino Uno and a micro:bit.
A number of exercises will be done to familiarize you with each device.
Then you will experiment with other devices made from these components which perform differing functions.
You can work together and help each other on this project, but each student must hand in their own work.

Preparation and Background- Must Complete Before Beginning work on advanced applicatons for Project 2.

Begin this by completing these exercises to learn to:

More Internet of Things

Items below are examples of what else can be done with the Raspberry Pi single board computer.
See Professor Paulson for more details on creating these applications.

IOT04. Internet of Things: Wi-Fi Monitoring

You will install and run WaveMon to monitor your wireless network connection running on a Raspberry Pi.

Wave Mon Wave Mon Output

IOT05. Apache2 Webserver on Raspberry Pi

You will install and run Apache2, a webserver.

Wave MonApache2

IOT03. Attach to Partner's Apache2 Webserver

You will work with a partner and use VNC to attach to their webserver on their Raspberry Pi.

Partner Apache2Partner's Apache2 Webserver

IOT07. Zenmap on Raspberry Pi

You will install and run Zenmap, a webserver.

Zen Map Zenmap Output

IOT08. Nagios Core on Pi Project

You will install and run Nagios Core on a Raspberry Pi, a website monitoring tool available for the Raspberry Pi.

Wave MonNagios Core

IOT09. RPi-Monitor Project

You will install and run RPi-Monitor, an embedded device monitoring tool available for the Raspberry Pi.

RPiMonitor RPiMonitor Output

RPiMonitor RPiMonitor Output




Below are additional projects, for information purposes only.

Below are instructions for setting up a MySQL server on the Pi.

  1. Install MySQL
    1. Boot the Raspberry Pi, make sure you have Interenet access, open a terminal and type:
      sudo apt install mariadb-server -y
    2. In a few minutes the installation will be complete.
    3. Once MySQL is installed, to verify it works, in the terminal type:
      sudo /etc/init.d/mysql status
      One Drive MySQL running successfully
    4. Log into the mysql installation, the default password is blank.
      In the terminal window type:
      sudo mysql -u root -p -h localhost
      Press Enter when prompted for the password.
      Type status to see mysql settings.
      One Drive MySQL status
    5. Install the world sample database by opening the Chromium browser on your RPi and typing the following into the address bar:
      One Drive Download World Database

      Then click 'Gzip', which will download the world database to the  '/home/pi/Downloads' folder.
    6. Open the folder containing the downloaded file and double click it to extract it as 'world.sql' in the '/home/pi/Documents' folder.
      One Drive Extract World Database
    7. Startup MariaDB/MySQL if it is not running, and type in:
      Source /home/pi/Documents/world.sql/world.sql
      Note: this path command is case-sensitive. Find the exact location using File Manager.
      In a few minutes you have created the three tables in the world database.
    8. Run the show tables command, you should see three tables:
      MariaDB [world]> show tables;
      | Tables_in_world |
      | city |
      | country |
      | countrylanguage |
      3 rows in set (0.001 sec)
    9. Experiment with commands you learned in Project 3:
      SELECT COUNT(*) FROM city;
      SELECT * FROM country;
    10. Congratulatons! Your IoT device is running a database server.
      With a little more work, you can use this database to collect information from sensors attached to your Raspberry Pi.

IOT20-Connect With ODBC

If ODBC is not installed on your laptop, do so now.

This exercise will show you how to connect to the MySQL database from another computer.

  1. On your laptop use a browser and go to this url to install the appropriate version, making sure to follow the instructions carefully:
    One Drive ODBC Installer
    Note that you do not have to set up an account, just download and run the installer.

    Use the 32 bit version of ODBC.
  2. Once installed, click Start, type in 'ODBC', find the 32 bit version and select 'Run as Administrator'
  3. Under the System DSN tab, Add a new Data Source, using the MySQL ODBC 8 driver.
    One Drive ODBC Installer
  4. Set the following parameters to establish your connection, realizing your values will be different:
    One Drive ODBC Setup

Make screen shots of the MySql installation and upload to the D2L Project04 Assignment folder.