Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / IoT

Storage Unit Flood Detector

3.00/5 (1 vote)
22 Mar 2018CPOL3 min read 7.4K  
This storage unit flood detector application is part of a series of how-to Internet of Things (IoT) code sample exercises using the Intel® IoT Developer Kit and a compatible Intel-based platform, cloud platforms, APIs, and other technologies.

This article is for our sponsors at CodeProject. These articles are intended to provide you with information on products and services that we consider useful and of value to developers

Introduction

This storage unit flood detector application is part of a series of how-to Internet of Things (IoT) code sample exercises using the Intel® IoT Developer Kit and a compatible Intel-based platform, cloud platforms, APIs, and other technologies.

From this exercise, developers will learn how to:

  • Interface with and sensors using MRAA and UPM from the Intel® IoT Developer Kit, a complete hardware and software solution to help developers explore the IoT and implement innovative projects.
  • Set up a web application server to let users enter the access code to disable the alarm system and store this alarm data using Azure Redis Cache* from Microsoft Azure*, Redis Store* from IBM* Bluemix*, or ElastiCache* using Redis* from Amazon* Web Services* (AWS*), different cloud services for connecting IoT solutions including data analysis, machine learning, and a variety of productivity tools to simplify the process of connecting your sensors to the cloud and getting your IoT project up and running quickly.
  • Connect to a server using IoT Hub from Microsoft Azure*, IoT from IBM Bluemix*, IoT from Amazon Web Services (AWS)*, AT&T M2X*, Predix* from GE, or SAP Cloud Platform* IoT, different cloud-based IoT platforms for machine to machine communication.

Available in:

C++
Java*
JavaScript
Python

What it is

Using a compatible Intel-based platform, this project lets you create a storage unit flood detector that:

  • continuously checks the moisture sensor.
  • sounds an audible warning in case of a possible flooding.
  • stores a record of each time water is detected, using cloud-based data storage.

How it works

This storage unit flood detector uses the moisture sensor to constantly ensure that your stored belongings are not destroyed by water damage.

If the moisture level exceeds a defined threshold, it makes a sound to indicate a warning.

Optionally, data can be stored using your own Microsoft Azure*, IBM Bluemix*, AT&T M2X*, AWS*, Predix*, or SAP* account.

First time setup

For all the samples in this repository, see the General Setup Instructions for required boards and libraries.

Hardware requirements

In addition to using a compatible platform listed in Hardware Compatibility, here is additional hardware you will need to run this example

This sample can be used with either Grove* or DFRobot* components.

Grove:

  1. Grove* Base Shield V2
  2. Grove* Moisture Sensor
  3. Grove* Speaker

DFRobot:

  1. Moisture Sensor
  2. Buzzer
  3. I/O Expansion Shield

Connecting the Grove* sensors

Image 1

You need to have a Grove* Shield connected to an Arduino* compatible breakout board to plug all the Grove* devices into the Grove* Shield. Make sure you have the tiny VCC switch on the Grove* Shield set to 5V.

Sensor Pin
Grove* Moisture Sensor A0
Grove* Speaker D5

Connecting the DFRobot* sensors

Image 2

You need to have a I/O Expansion Shield connected to an Arduino* compatible breakout board to plug all the DFRobot* devices into the I/O Expansion Shield.

Sensor Pin
Moisture Sensor A3
Buzzer A1

IMPORTANT NOTICE: This software is sample software. It is not designed or intended for use in any medical, life-saving or life-sustaining systems, transportation systems, nuclear systems, or for any other mission-critical application in which the failure of the system could lead to critical injury or death. The software may not be fully tested and may contain bugs or errors; it may not be intended or suitable for commercial release. No regulatory approvals for the software have been obtained, and therefore software may not be certified for use in certain countries or environments.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)