Skip to content

Commit

Permalink
1.0.0 Docs
Browse files Browse the repository at this point in the history
  • Loading branch information
AdamMiltonBarker committed Aug 1, 2021
1 parent 82381b0 commit 5d51b42
Show file tree
Hide file tree
Showing 12 changed files with 214 additions and 0 deletions.
Binary file added docs/img/arduino-ide.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/arduino-serial-monitor.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/hias-ble-network.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/hias-device-create.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/hias-device-edit.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/hias-device-list.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/hias-esp32-pir-sensor-fritzing.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/hias-esp32-pir-sensor.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/img/project-banner.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# Documentation

![HIAS ESP32 PIR Sensor](img/project-banner.jpg)

 

# Introduction

PIR sensors can play a large role in Internet of Things (IoT) security systems. This project shows the potential of using an ESP32 to host a Bluetooth Low Energy (BLE) server providing readings from an PIR sensor to a HIAS BLE IoT Agent.

![HIAS ESP32 PIR Sensor](img/hias-esp32-pir-sensor.gif)

The server waits for a HIAS BLE IoT Agent to connect and provides it with the current reading of the PIR sensor. The BLE IoT Agent next verifies the server has permissions to store data on the HIAS network via the HIASBCH iotJumpWay permissions smart contract.

![HIAS BLE Network](img/hias-ble-network.jpg)

Once the server is verified, the BLE IoT Agent processes the sensor data, updates the related contextual data and stores the data in the historical database.

 

# Hardware

- [ESP32 Devkit](https://docs.espressif.com/projects/esp-idf/en/latest/esp32s2/hw-reference/esp32s2/user-guide-saola-1-v1.2.html)
- [HC-SR501 PIR Sensor](https://www.amazon.es/Yizhet-HC-SR501-Infrared-Arduino-Raspberry/dp/B08B3L19QF)
- Wires

 

# Software

- [Arduino IDE](https://www.arduino.cc/en/software)
- [Arduino-ESP32](https://github.com/espressif/arduino-esp32)

 

# Getting Started

To set up and install your HIAS ESP32 PIR Sensor follow the following guides:

- [Installation guide](installation/installation.md)

 

# Contributing
Asociación de Investigacion en Inteligencia Artificial Para la Leucemia Peter Moss encourages and welcomes code contributions, bug fixes and enhancements from the Github community.

Please read the [CONTRIBUTING](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/blob/main/CONTRIBUTING.md "CONTRIBUTING") document for a full guide to contributing to our research project. You will also find our code of conduct in the [Code of Conduct](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/blob/main/CODE-OF-CONDUCT.md) document.

## Contributors
- [Adam Milton-Barker](https://www.leukemiaairesearch.com/association/volunteers/adam-milton-barker "Adam Milton-Barker") - [Asociación de Investigacion en Inteligencia Artificial Para la Leucemia Peter Moss](https://www.leukemiaresearchassociation.ai "Asociación de Investigacion en Inteligencia Artificial Para la Leucemia Peter Moss") President/Founder & Lead Developer, Sabadell, Spain

 

# Versioning
We use [SemVer](https://semver.org/) for versioning.

 

# License
This project is licensed under the **MIT License** - see the [LICENSE](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/blob/main/LICENSE "LICENSE") file for details.

 

# Bugs/Issues
We use the [repo issues](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/issues "repo issues") to track bugs and general requests related to using this project. See [CONTRIBUTING](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/blob/main/CONTRIBUTING.md "CONTRIBUTING") for more info on how to submit bugs, feature requests and proposals.
147 changes: 147 additions & 0 deletions docs/installation/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
# Installation Guide

![HIAS ESP32 PIR Sensor](../img/project-banner.jpg)

# Introduction
This guide will take you through the installation process for the **HIAS ESP32 PIR Sensor** project.

 

# Prerequisites
You will need to ensure you have the following prerequisites installed and set up.

## Arduino

- [Arduino IDE](https://www.arduino.cc/en/software)
- [Arduino-ESP32](https://github.com/espressif/arduino-esp32)

## HIAS
- [HIAS Core](https://github.com/AIIAL/HIAS-Core)
- [HIASCDI](https://github.com/AIIAL/HIASCDI)
- [HIASHDI](https://github.com/AIIAL/HIASHDI)
- [HIASBCH](https://github.com/AIIAL/HIASBCH)
- [HIAS MQTT IoT Agent](https://github.com/AIIAL/HIAS-MQTT-IoT-Agent)
- [HIAS MQTT Blockchain Agent](https://github.com/AIIAL/HIASBCH-MQTT-Blockchain-Agent)
- [HIAS BLE IoT Agent](https://github.com/AIIAL/HIAS-BLE-IoT-Agent)

 

# Operating System
The HIAS ESP32 PIR Sensor installation guide is compatible with:

- Windows
- Ubuntu

 

# Clone the repository

Clone the [HIAS ESP32 PIR Sensor](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor " HIAS ESP32 PIR Sensor") repository from the [Peter Moss MedTech Research Project](https://github.com/AIIAL "Peter Moss MedTech Research Project") Github Organization.

To clone the repository and install the project, make sure you have Git installed. Now navigate to the directory you would like to clone the project to and then use the following command.

``` bash
git clone https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor.git
```

This will clone the HIAS ESP32 PIR Sensor repository.

``` bash
ls
```

Using the ls command in your home directory should show you the following.

``` bash
HIAS-ESP32-PIR-Sensor
```

Navigate to the **HIAS-ESP32-PIR-Sensor** directory, this is your project root directory for this tutorial.

## Developer forks

Developers from the Github community that would like to contribute to the development of this project should first create a fork, and clone that repository. For detailed information please view the [CONTRIBUTING](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/blob/main/CONTRIBUTING.md "CONTRIBUTING") guide. You should pull the latest code from the development branch.

``` bash
git clone -b "2.0.0" https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor.git
```

The **-b "2.0.0"** parameter ensures you get the code from the latest developer branch. Before using the below command please check our latest main branch in the button at the top of the project README.

 

# HIAS

## HIAS Device

![HIAS iotJumpWay Device List](../img/hias-device-list.jpg)

This project is a HIAS iotJumpWay (network) device. To set up a HIAS network device visit your [HIAS Core](https://github.com/AIIAL/HIAS-Core) UI and navigate to **IoT -> Devices**, then click on the **+ CREATE** button at the top right of the device list.

![HIAS iotJumpWay Device Create](../img/hias-device-create.jpg)

Complete the form with the information about your HIAS ESP32 PIR Sensor.

### Remember

- Make sure to select **PIR Sensor** as a device sensor.
- Make sure to save the configuration provided once the device is created.

## HIAS Device Configuration

![HIAS iotJumpWay Device Configuration](../img/hias-device-edit.jpg)

Once your HIAS device has been created, you will be able to access it via **IoT -> Devices**. At the top of the configuration pane you will see the **Device Configuration** download button. Download the configurationfile to the **arduino/HIAS-ESP32-PIR-Sensor/data** directory and save it as **config.json**.

 

# ESP32

Now you need to wire up your ultrasonic sensor to your ESP32.

![ESP32 PIR Sensor](../img/hias-esp32-pir-sensor-fritzing.jpg)

 

# Arduino

For this tutorial you need need **Arduino IDE 1.8.13**. You cannot use the **Arduino IDE 2.0 BETA** as it currently does not provide the **ESP32 Sketch Data Upload** feature.

![Arduino IDE](../img/arduino-ide.jpg)

Navigate to the **arduino/HIAS-PIR-Sensor** directory in your project root and double click the **HIAS-PIR-Sensor.ino** file to open it in Arduino IDE.

Make sure you select the **DOIT ESP32 DEVKIT V1** board in **Tools** and select the correct **COM port** in the port settings.

To upload the **config.json** file we downloaded from HIAS to the ESP32, click on **Tools -> ESP32 Sketch Data Upload**. This will upload the config file that will be used by the server during startup.

![Arduino Serial Monitor](../img/arduino-serial-monitor.jpg)

Finally, click on the **Upload** button in Arduino IDE and wait for the software to upload to your ESP32. Once the upload process has finished, open the **Serial Monitor**.

If you already have the HIAS BLE IoT Agent running you will need to restart it so that it retrieves the updated BLE device list. Once you have restarted the HIAS BLE IoT Agent, you will be able to see the data that is being sent to the agent in the serial monitor.

 

# Contributing
Asociación de Investigacion en Inteligencia Artificial Para la Leucemia Peter Moss encourages and welcomes code contributions, bug fixes and enhancements from the Github community.

Please read the [CONTRIBUTING](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/blob/main/CONTRIBUTING.md "CONTRIBUTING") document for a full guide to contributing to our research project. You will also find our code of conduct in the [Code of Conduct](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/blob/main/CODE-OF-CONDUCT.md) document.

## Contributors
- [Adam Milton-Barker](https://www.leukemiaairesearch.com/association/volunteers/adam-milton-barker "Adam Milton-Barker") - [Asociación de Investigacion en Inteligencia Artificial Para la Leucemia Peter Moss](https://www.leukemiaresearchassociation.ai "Asociación de Investigacion en Inteligencia Artificial Para la Leucemia Peter Moss") President/Founder & Lead Developer, Sabadell, Spain

 

# Versioning
We use [SemVer](https://semver.org/) for versioning.

 

# License
This project is licensed under the **MIT License** - see the [LICENSE](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/blob/main/LICENSE "LICENSE") file for details.

 

# Bugs/Issues
We use the [repo issues](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/issues "repo issues") to track bugs and general requests related to using this project. See [CONTRIBUTING](https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor/blob/main/CONTRIBUTING.md "CONTRIBUTING") for more info on how to submit bugs, feature requests and proposals.
2 changes: 2 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
site_name: HIAS ESP32 PIR Sensor
site_url: https://github.com/AIIAL/HIAS-ESP32-PIR-Sensor

0 comments on commit 5d51b42

Please sign in to comment.