## Hardware and Measurement System
### Single-Board Computer Platform  
The RPi 3 Model B+ was used as a measurement hardware platform to utilize external high quality sensors. A single hardware node is comprised of the RPi single-board computer itself (a), one or several external sensors (b), a battery supply (c), the specific sensor connection cable (d), and an Android smartphone with the control app (e), as shown in Figure 1. Different types of sensors can be integrated in the measurement system ranging from low-cost sensors with an inter-integrated circuit (I\({}^{2}\)C) interface over sensors connected via serial peripheral interface (SPI) to analog sensors requiring an ADC. The above-mentioned custom-design interface boards allow for the connection of several I\({}^{2}\)C- and SPI-based digital sensors as well as feature ADCs to connect analog sensors. A self-designed interface board expands the existing 2-Pin-I\({}^{2}\)C-port such that four sensors can be connected. In the same manner, an incorporated demultiplexer expands the two provided SPI chip select ports of the RPi to allow for the attachment of several SPI devices. Figure 1: Hardware components of the measurement system. (**a**) The RPi with an additional sensor board; (**b**) the external sensor MPU-6050; (**c**) the battery power supply; (**d**) the wire to connect the RPi and the external sensor; (**e**) the smartphone Sony Xperia Z5 running control and analysis app. The RPi is equipped with a 2.4 GHz WiFi 802.11n Broadcom FullMAC chip, which is utilized by the developed software framework to provide a wireless mesh network. To facilitate the easy and quick connection of various sensor hardware, the authors developed two sensor boards that can be connected on top of the RPi's GPIO pin header. Figure 2 (left) shows the connector board equipped with four programmable ADS1115 ADCs [22] to connect three input channels of analog sensor hardware for each. Figure 2 (right) shows the connector board for primary use with the digital sensor hardware. The board features a battery-backed PCF2129 CMOS real time clock [23] to keep system time when the RPi is disconnected from a power source as well as four Molex six-way headers to connect the SPI-based sensor hardware. Both sensor boards are equipped with two, or respectively four JST four-way headers connected to the I\({}^{2}\)C bus of the RPi. It should be noted that the software framework presented in this paper does not depend on any additional hardware. Individual sensor hardware can be connected to the RPi directly to the specific pins of the GPIO header. To facilitate RPi-based measurements, a corresponding software framework was developed. Each node uses a modified version of the Debian-based computer operating system Raspbian including a customized version of the Linux kernel to enable the execution of real-time tasks on the platform [24]. This modification is key to facilitating high-frequency sensor data acquisition without the need of an additional dedicated microcontroller. The actual software framework is implemented in the Python programming language to accelerate the software development cycle. It is comprised of three core parts:  
* a unified software interface communicating with the attached sensor hardware,
* a data acquisition and transport process, and
* a remote procedure call (RPC) server to expose a control interface to the smartphone application. When a measurement task is initiated, the RPC server spawns a carefully designed process that handles the actual polling of the sensor hardware. The process utilizes a real-time scheduling class of the operating system with a high priority to ensure low latencies during the execution of the periodic sampling task. Furthermore, the operating system is instructed to associate all current and future memory allocations to physical memory and prevent these memory pages from being paged-out at any time, even when the system is facing memory pressure.