Click here to Skip to main content
15,612,565 members
Articles / Internet of Things
Posted 25 Oct 2017

Tagged as


2 bookmarked

Access control

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
25 Oct 2017CPOL3 min read
This access control system 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


This access control system 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 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:

What it is

Using a compatible Intel-based platform, this project lets you create a smart access control system that:

  • monitors a motion sensor to detect when a person is in an area that requires authorization.
  • can be accessed with your mobile phone via the built-in web interface to disable the alarm.
  • keeps track of access, using cloud-based data storage.

How it works

This access control system provides the following user flow:

  1. Passive infrared (PIR) motion sensor looks for motion.
  2. User sets off the motion detector and has 30 seconds to enter the correct code in the browser.
  3. If the user fails to enter the code in the given time, the alarm goes off.
  4. If the user enters the correct code, the system waits for 30 seconds before allowing the user to pass.

Additionally, various events (looking-for-motion, motion-detected, invalid-code, etc.) are logged.

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 supported 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.


  1. Grove* Base Shield V2
  2. Grove* PIR Motion Sensor
  3. Grove* RGB LCD


  1. PIR (Motion) Sensor.
  2. LCD Keypad Shield

Connecting the Grove* sensors

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
PIR Motion Sensor D4

Connecting the DFRobot* sensors

You need to have a LCD Display Shield connected to an Arduino*-compatible breakout board to plug all the DFRobot* devices into the LCD Display Shield.

Sensor Pin
PIR (Motion) Sensor A2

Disabling the alarm

The alarm is disabled using a single-page web interface served directly from the the target platform while the sample program is running.

The web server runs on port 3000, so if your target platform is connected to Wi-Fi on, the address to browse to if you are on the same network is

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.


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

Written By
United States United States
You may know us for our processors. But we do so much more. Intel invents at the boundaries of technology to make amazing experiences possible for business and society, and for every person on Earth.

Harnessing the capability of the cloud, the ubiquity of the Internet of Things, the latest advances in memory and programmable solutions, and the promise of always-on 5G connectivity, Intel is disrupting industries and solving global challenges. Leading on policy, diversity, inclusion, education and sustainability, we create value for our stockholders, customers and society.
This is a Organisation

42 members

Comments and Discussions

-- There are no messages in this forum --