Skip to content
Snippets Groups Projects
Commit ebaf360c authored by Alexandra Rosa Jäger's avatar Alexandra Rosa Jäger
Browse files

Merge branch 'documentation-updates' into 'main'

Readme Updates, repository cleanup, add license

See merge request !49
parents 63ed4122 fecccd27
No related branches found
No related tags found
1 merge request!49Readme Updates, repository cleanup, add license
Pipeline #155359 passed
Showing
with 477 additions and 64 deletions
......@@ -157,7 +157,7 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/
.idea/
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
......
......@@ -8,6 +8,10 @@ RUN apt-get update && \
ENV PATH $PATH:/root/.platformio/penv/bin
COPY . /app
WORKDIR /app
RUN ./build-all.sh
CMD ["bash"]
\ No newline at end of file
LICENSE 0 → 100644
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2024 Zoe Michaela Dietmar Pfister
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
# Sensor System
This repository contains code used on the ESP32 devices within the forest.
This repository contains code used on the ESP32 devices within the forest. An overview of the structure is shown in the Figure below:
![Component Diagram](resources/component-overview.png)
We base the FORTE-WSN architecture on two subsystems: The **Host** and the **Client**.
These can be thought of as the **sink node** and the **sensor nodes** of WSNs respectively.
They contain the processing units, sensor connections, wireless communication units, and more required to collect and transmit sensor data.
We name the subsystem that is responsible for collecting sensor data as **Client**.
The subsystem that is responsible for receiving data from Clients and forwarding that data to the **Backend** System as the **Host**.
Wireless communication between **Clients** and the **Host** is established using *ESP-NOW*.
Communication from the **Host** to the **Backend** is done using LTE-M.
To streamline wireless communication between *Client* and *Host*, we developed a shared library (**DataTransfer**) that defines all relevant data structures that both subsystems must adhere to.
We use a star-topology network without mesh networking functionality to save energy and reduce complexity of the system.
## Project Structure
The project is structured as follows:
* `client`: Contains library code and source files for ESP32 client devices (i.e. sensors)
* `lib`: Contains library code for the ESP32 client devices that is shared among all client devices. For a list of libraries, see the `lib` directory.
* `lib/includes`: Contains header files used by both library and client code.
* `libs`: Contains library code for the ESP32 client devices that is shared among all client devices. For a list of libraries, see the `libs` directory.
* `libs/includes`: Contains header files used by both library and client code.
* `client_central_mast`: Contains source files for the central mast client device.
* `client_satellite`: Contains source files for the satellite client device (used by dendrometers).
* `ESPCamera`: Contains source files for the ESP32 camera client device (camera and SHT85).
* `host/host_central_mast`: Contains source code for the ESP32 host device (LTE capabilities)
* `code_snippets`: Contains code snippets that may be useful for future development. These are **not intended** to be compiled and run as-is.
* `hardware`: Contains hardware design files.
\ No newline at end of file
* `hardware`: Contains hardware design files.
## Dependencies
All of the software in this repository requires PlatformIO to compile.
We also use PlatformIO for dependency management and flashing of our ESP32 devices.
You can install it on all major operating systems via https://docs.platformio.org/en/latest/integration/ide/pioide.html or https://platformio.org/.
To build, run, and flash each project, change directory to the individual project and run `pio run` on the command line.
When using PlatformIO in Visual Studio Code, this can also be done via a graphical user interface.
We also provide a dockerfile that will compile all relevant projects and store the files within the container under `/app/buildfiles`.
You can build the docker image using `docker build -t forte:1.0 .` and then running `docker run -it --rm forte:1.0`.
You can follow https://stackoverflow.com/a/22050116/10266066 to retrieve the data from the container.
### Client Dependencies
**wollewald/ADS1115_WE@^1.3.1**
- MIT License
- URL: https://github.com/wollewald/ADS1115_WE
- We use this library to interface with the ADS1115 ADC. It allows us to readAnalog sensors such as the DR26 dendrometer or the TEROS10 soil moisture sensor through an I2 C connection. We chose this library over the official one provided by Adafruit as it was more power efficient.
**wollewald/INA219_WE@^1.3.1**
- MIT License
- URL: https://github.com/wollewald/INA219_WE
- This library provides an implementation to interface with the INA219 current and voltage sensor via I2C.
**adafruit/Adafruit LC709203F@^1.3.2**
- BSD License
- URL: https://github.com/adafruit/Adafruit_LC709203F
- We use this library to interface with the LC709203F LiPoly / LiIon Fuel Gauge and Battery Monitor via I2C.
**fbiego/ESP32Time@^2.0.0**
- MIT License
- URL: https://github.com/fbiego/ESP32Time
- We use ESP32Time to set and retrieve the time of the internal RTC of an
ESP32.
**bblanchon/ArduinoJson@^6.19.4**
- MIT License
- URL: https://github.com/bblanchon/ArduinoJson
- During early development of the system, we used this library to serialize sensor data to JSON objects for transmission to the host.
**sensirion/arduino-sht@^1.2.2**
- BSD 3-Clause "New" or "Revised" License
- URL: https://github.com/Sensirion/arduino-sht
- This library enables us to interface with the SHT line of humidity and temperature sensors (i.e., SHT85) via I2C.
**envirodiy/SDI-12@^2.1.4**
- BSD 3-Clause "New" or "Revised" License
- URL: https://github.com/EnviroDIY/Arduino-SDI-12
- This library implements all necessary functions to easily interface with sensors using the SDI-12 communication protocol. In our case, the library is used to communicate with the TEROS11 soil moisture and temperature sensors.
**emelianov/modbus-esp8266@^4.1.0**
- BSD New License
- URL: https://github.com/emelianov/modbus-esp8266
- This library implements all functions to interface with sensors using the Modbus communication protocol. We use the library to retrieve sensor data from the SEM228A solar radiation sensor and the SEM404 precipitation sensor through RS485.
### Host Dependencies
**vshymanskyy/TinyGSM@^0.11.5**
- GNU Lesser General Public License v3.0
- URL: https://github.com/vshymanskyy/TinyGSM
- We use this library to interface with the LTE-M Modem of the Host and establish a connection to the mobile network. This library proofed to be essential for implementing the LTE-Connection manager, as it provides a multitude of convenience functions, code examples, and existing documentation.
**vshymanskyy/StreamDebugger@^01.0.1**
- MIT License
- URL: https://github.com/vshymanskyy/StreamDebugger
- Used by TinyGSM to allow for debug output of the LTE-M modem.
**arduino-libraries/ArduinoHttpClient@^0.4.0**
- Apache License, version 2.0
- URL: https://github.com/arduino-libraries/ArduinoHttpClient
- This library provides simple functions that allow CRUD requests to a URL. We use it to transmit data within the global deque or from the ResendManager to the Backend via HTTP POST requests. Further, we use HTTP GET requests within the TimeManager to retrieve the current UTC time from the Backend.
**adafruit/RTClib@^2.1.1**
- MIT License
- URL: https://github.com/adafruit/RTClib
- We use this library to interface with the DS3231 precision RTC, which we use instead of the ESP32 internal RTC. As soon as we receive the current UTC time from the server, we update the DS3231 through this library. Further, we retrieve the UTC time from the RTC using this library when sending HostPackage DTOs to Clients.
**fbiego/ESP32Time@^2.0.0**
- MIT License
- URL: https://github.com/fbiego/ESP32Time
- This library can be used to set and retrieve the time of the internal RTC of an ESP32. While it is currently unused, it could be used as a fallback for the DS3231 RTC in the future.
**bblanchon/ArduinoJson@^6.19.4**
- MIT License
- URL: https://github.com/bblanchon/ArduinoJson
- We use this library to serialize the JSON object containing sensor data that is sent to the Backend. In early stages of the system, we also used it to deserialize incoming JSON messages from Clients.
## Additional Information
You can find additional information in the [Wiki](https://git.uibk.ac.at/informatik/qe/forte/sensor-system/-/wikis/home) and the [Master Thesis of Zoe Pfister](https://fileshare.uibk.ac.at/f/838e62ab622143ee9e28/).
\ No newline at end of file
#!/bin/bash
mkdir -p "$(dirname "$0")/buildfiles"
# Array of directories to build
directories=(
"$(dirname "$0")/client/client_central_mast/"
"$(dirname "$0")/client/client_satellite/"
"$(dirname "$0")/client/ESPcam/"
"$(dirname "$0")/host/host_central_mast/"
)
# Loop through each directory and run pio run
for dir in "${directories[@]}"; do
echo "Running pio run in $dir"
(cd "$dir" && pio run)
# copy the firmware.bin to the buildfiles directory (its somewhere within .pio/build)
firmware_path=$(find "$dir"/.pio/build -name "firmware.bin")
cp "$firmware_path" "$(dirname "$0")/buildfiles/$(basename "$dir").bin"
echo "Done running pio run in $dir"
done
\ No newline at end of file
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="ASK" />
<option name="description" value="" />
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$" />
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/ESPcam.iml" filepath="$PROJECT_DIR$/.idea/ESPcam.iml" />
</modules>
</component>
</project>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$/../../.." vcs="Git" />
<mapping directory="$PROJECT_DIR$/../.." vcs="Git" />
</component>
</project>
\ No newline at end of file
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
# Client CAM(era)
This software is run on so-called ESP-CAM microcontrollers that are positioned on top of the central mast.
A client capable of interfacing with I2C sensors and a 2
MP camera. Images are stored on a local SD card. **No images are sent to the host device.**
The following sensors are implemented:
| Sensor | Measurement | Manufacturer | Sensor Connection | Location |
|-----------|-----------------------------------------------|------------------|-----------------------------------------------|----------|
| SHT85 | Air temperature and humidity | Sensirion | I2C | CAM |
| OV2640 | 2MP Color Camera | OmniVision | SCCB | CAM |
## Installation
The Client can be build and flashed onto an ESP32 using the command `pio run -t upload`.
Please note that the upload and monitoring port may need to be changed depending on how and where your microcontroller is connected to the computer.
## Usage
Define the `HARDCODED_HOST_MAC` address of the host device in `include/Definitions.h` and flash the code onto the ESP32. The ESP32 will then send the collected data to the specified host device.
......@@ -22,8 +22,11 @@ build_flags =
-DCORE_DEBUG_LEVEL=5
-std=gnu++17
build_unflags = -std=gnu++11
; Monitor and Upload Ports, may need to be changed based on your system
monitor_port = /dev/ttyUSB0
upload_port = /dev/ttyUSB0
extra_scripts =
pre:../../firmware-version.py
lib_deps =
......
# Client Central Mast
A Client capable of interfacing with sensors connected via SDI-12, I2C, and RS-485.
The following sensors are implemented:
| Sensor | Measurement | Manufacturer | Sensor Connection | Location |
| ------- | ---------------------------------- | ------------ | --------------------- | -------- |
| TEROS11 | Soil temperature and Soil moisture | METER | SDI-12 | CM |
| INA219 | Current/Power Monitor | Adafruit | I2C | CM |
| SEM404 | Precipitation | SenTec | Modbus RTU via RS-485 | CM |
| SEM228A | Solar-radiation | SenTec | Modbus RTU via RS-485 | CM |
## Installation
The Central Mast Client can be build and flashed onto an ESP32 using the command `pio run -t upload`.
Please note that the upload and monitoring port may need to be changed depending on how and where your microcontroller is connected to the computer.
## Usage
Define the `HARDCODED_HOST_MAC` address of the host device in `include/Definitions.h` and flash the code onto the ESP32. The ESP32 will then send the collected data to the specified host device.
# Client Mock
The mock client is a simple ESP32 microcontroller that simulates transmission of data to a host via ESP-NOW. It is used for testing the host device without the need for connecting sensors.
## Installation
The Client can be build and flashed onto an ESP32 using the command `pio run -t upload`.
Please note that the upload and monitoring port may need to be changed depending on how and where your microcontroller is connected to the computer.
## Usage
Define the `HARDCODED_HOST_MAC` address of the host device in `include/Definitions.h` and flash the code onto the ESP32. The ESP32 will then send a message to the host device, sleep for 5 seconds, and repeat the process.
\ No newline at end of file
# Client Satellite
This software is run on clients that are positioned away from the central mast.
The satellite client is capable of interfacing with sensors connected via I2C and Analog signals via an ADC.
The following sensors are implemented:
| Sensor | Measurement | Manufacturer | Sensor Connection | Location |
| --------- | --------------------------------------------- | ------------ | ----------------------- | -------- |
| DR26 | Circumference-increment | EMS Brno | Analog via ADC over I2C | SAT |
| TEROS10 | Soil moisture | METER | Analog via ADC over I2C | SAT |
| LC709203F | LiPoly / LiIon Fuel Gauge and Battery Monitor | Adafruit | I2C | SAT |
## Installation
The Client can be build and flashed onto an ESP32 using the command `pio run -t upload`.
Please note that the upload and monitoring port may need to be changed depending on how and where your microcontroller is connected to the computer.
## Usage
Define the `HARDCODED_HOST_MAC` address of the host device in `include/Definitions.h` and flash the code onto the ESP32. The ESP32 will then send the collected data to the specified host device.
# Client
This directory contains the source code for the client devices of the FORTE system. The client devices are ESP32 microcontrollers that are responsible for collecting sensor data and transmitting it to the host device. The client devices are divided into different types, each with a specific set of sensors and responsibilities.
## Structure
* `libs`: Contains library code for the ESP32 client devices that is shared among all client devices and the FORTE Sensor software components. For a list of libraries, see the `libs` directory.
* `libs/includes`: Contains header files used by both library and client code.
* `client_central_mast`: Contains source files for the central mast client device.
* `client_satellite`: Contains source files for the satellite client device (used by dendrometers).
* `ESPCamera`: Contains source files for the ESP32 camera client device (camera and SHT85).
* `client_mock`: Contains source files for the mock client device (used for testing).
* `Tests`: Contains unit tests for verifying successful building of client libraries.
## Used Hardware
The client devices are based on the ESP32 microcontroller and were tested on the dev boards produced by EzSBC (https://www.ezsbc.com/product/esp32_bat-battery-charging-pro/).
## Detailed Description
The Client subsystem can be considered to be the sensor-node of the system, as
its core responsibility lies in collecting measurements from sensors and transmitting
them to the Host via the ESP-NOW protocol. We present the component
diagram of the Client subsystem below.
![Component Diagram](../resources/component-client.png)
Figure 1: Component diagram of the Client subsystem.
For better understandability of the Client, we first want to discuss the FORTE
Sensor component in more detail. As seen in Figure 1, we decided to break
the component down into smaller sub-components. The FORTE Sensor component
represents the necessary hard- and software required to connect sensors to the Client
and retrieve their data. This means that for each specific sensor of a manufacturer, one must integrate a new or existing FORTE Sensor. Of course, a single Client
is capable of handling multiple FORTE Sensor components. Each FORTE Sensor
contains the following sub-components:
- The **Sensor-Dependent Functionality** sub-component is responsible for setting
up the initial connection between the sensor and the Sensor Interface.
- The **Message Builder** sub-component uses the set-up Sensor Interface to col-
lect data from the sensor. It then combines the raw data, meta information
on the FORTE Sensor, and the current UTC timestamp retrieved from the
ESP32’s internal RTC into a data structure we call Message.
- Lastly the **Sensor Interface** is the sub-component that directly talks to the
Sensors via a cable connection.
Like the **Host** subsystem, the entry point of the **Client** subsystem is located within the *Main* component.
The Main component is responsible for initialization and interaction with all other components of the Client.
Before requesting new data in the form of *Messages* from the *FORTE Sensor* components, the Main component will configure the GPIO to allow correct usage of the sensors.
To allow for greater modularity, Main uses functionality defined in the *Utility Functions* component to accomplish this.
After collecting one or more Messages from the *FORTE Sensor*, Main provides all gathered Messages to the *ESP-NOW Message-Sender*, which further processes and transmits the sensor data stored within the Message to the **Host** subsystem.
The **Host** provides an acknowledgement to the **Client** upon successful data transmission.
This acknowledgement is received by the *ESP-NOW ACK-Receiver* component that writes the contained UTC timestamp to the internal RTC of the **Client**.
Note that re-transmission of failed data transmissions is currently not included in the architecture.
Finally, after transmission has finished, the Main component deactivates all remaining *FORTE Sensors* including power to its sensors [1] and requests the *Deep-Sleep Manager* to enter an ultra-low-power deep-sleep mode for a variable duration.
By entering deep-sleep, we can reduce the energy consumption of the **Client** to a minimum.
We want to mention that it is possible to extend a **Client** with a non-volatile storage device such as an SD Card.
This would allow addition of a Resend-Manager.
Additionally, it would provide the option to include multimedia sensors like cameras.
These sensors collect a large amount of data that can then also be stored on the storage device for later manual collection.
[1]: Note that for some sensors (i.e., precipitation sensors), power is not cut off during deep-sleep.
## Additional Information
Please consult the Wiki for more information.
\ No newline at end of file
{
// See http://go.microsoft.com/fwlink/?LinkId=827846
// for the documentation about the extensions.json format
"recommendations": [
"platformio.platformio-ide"
],
"unwantedRecommendations": [
"ms-vscode.cpptools-extension-pack"
]
}
{
"cmake.configureOnOpen": true
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment