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.
More information about this sample, how to set it up, and how it works can be found in the
For all the samples in this repository, see the for required boards and libraries.
| Sensor | Pin |
|---|---|
| PIR Motion Sensor | D4 |
| Grove RGB LCD | I2C |
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 |
More details on the hardware requirements can be found in the
and
- Node.js
- MRAA and UPM Node.js bindings
- Packages as listed in the package.json file in this example
- Microsoft Azure*, IBM Bluemix*, AT&T M2X*, AWS*, Predix*, or SAP* account (optional)
To configure the example for the Grove* kit, just leave the kit key in the config.json set to grove. To configure the example for the DFRobot* kit, change the kit key in the config.json to dfrobot as follows:
{
"kit": "dfrobot",
"CODE": "4321"
}
To configure the example for the optional Microsoft Azure*, IBM Bluemix*, or AWS data store, add the SERVER and AUTH_TOKEN keys in the config.json file below the "CODE" key as follows:
{
"kit": "grove",
"CODE": "4321",
"SERVER": "http://intel-examples.azurewebsites.net/logger/access-control",
"AUTH_TOKEN": "s3cr3t"
}
For information on how to configure the example for an optional Microsoft Azure*, IBM Bluemix*, AT&T M2X*, AWS*, Predix*, or SAP* IoT cloud server, go to:
https://github.com/intel-iot-devkit/iot-samples-cloud-setup
To run this example on the board, simply enter
$ npm install
$ npm run
$ ./access-control
You will see output similar to below when the program is running.
11:27:35 **** Rebuild of configuration Debug for project access-control ****
Info: Interal Builder is used for build
i586-poky-linux-g++ -std=c++1y "-IC:\\Users\\jlsti_000\\Desktop\\<ip-adddress>\\iotdk-ide-win\\devkit-x86\\sysroots\\i586-poky-linux/usr/include/upm" "-IC:\\Users\\jlisti_000\\Documents\\Git..."
i586-poky-linux-g++ -std=c++1y "-IC:\\Users\\jlsti_000\\Desktop\\<ip-adddress>\\iotdk-ide-win\\devkit-x86\\sysroots\\i586-poky-linux/usr/include/upm" "-IC:\\Users\\jlisti_000\\Documents\\Git..."
i586-poky-linux-g++ -std=c++1y "-IC:\\Users\\jlsti_000\\Desktop\\<ip-adddress>\\iotdk-ide-win\\devkit-x86\\sysroots\\i586-poky-linux/usr/include/upm" "-IC:\\Users\\jlisti_000\\Documents\\Git..."
i586-poky-linux-g++ -std=c++1y "-IC:\\Users\\jlsti_000\\Desktop\\<ip-adddress>\\iotdk-ide-win\\devkit-x86\\sysroots\\i586-poky-linux/usr/include/upm" "-IC:\\Users\\jlisti_000\\Documents\\Git..."
i586-poky-linux-g++ -std=c++1y "-IC:\\Users\\jlsti_000\\Desktop\\<ip-adddress>\\iotdk-ide-win\\devkit-x86\\sysroots\\i586-poky-linux/usr/include/upm" "-IC:\\Users\\jlisti_000\\Documents\\Git..."
i586-poky-linux-g++ "--sysroot=C:\\Users\\jlsti_000\\Desktop\\<ip-adddress>\\iotdk-ide-win\\devkit-x86\\sysroots\\i586-poky-linux" -lmraa -o access-control "src\\access-control.o" "lib\\twilio-cplu"...
11:27:40 Build Finished (took 5s.378ms)
Refer to for details on the functionality.
You can optionally store the data generated by this sample program using cloud-based IoT platforms from Microsoft Azure*, IBM Bluemix*, AT&T M2X*, AWS*, Predix*, or SAP*.
For information on how to connect to your own cloud server, go to:
https://github.com/intel-iot-devkit/iot-samples-cloud-setup
Optionally, you can store the data generated by this sample program in a back-end database deployed using Microsoft Azure*, IBM Bluemix*, or AWS, along with Node.js*, and a Redis* data store.
For information on how to set up your own cloud data server, go to:
https://github.com/intel-iot-devkit/intel-iot-examples-datastore
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.