## 3 Materials and Methods
### GaitBand: Motion Monitoring Device for Fall Detection  
Fall detection in NDDs is essential as individuals with conditions like PD or AD are at an increased risk of falling due to compromised motor skills, balance issues, and cognitive deterioration. Detecting falls in real-time allows for rapid intervention, ensuring timely medical assistance, which is important for preventing further complications like fractures or head injuries. Furthermore, fall detection provides valuable data to monitor disease progression, optimize care plans, and improve patient safety. GaitBand is a wearable device used to collect movement data, particularly for applications like fall detection. The main components are the following:  
* **Battery Charging Module**: It manages the power supply of the device by charging the accumulator and ensuring it remains operational for extended periods without needing frequent recharging. * **The ESP8266 Wi-Fi Module**: It is responsible for wireless communication. It connects the GaitBand to a Wi-Fi network, allowing the collected movement data to be transmitted to ICIPRO Cloud for further analysis. * **Six-Axis Accelerometer and Gyroscope**: It measures movement along six axes (three for acceleration and three for rotational movement). Raw accelerometry data can be extracted to provide information regarding activity intensity, posture, postural transitions, and walking patterns. Figure 2 illustrates the components of GaitBand. The interconnection of these components is presented in Figure 3.  
A controller-peripheral architecture (with the NodeMCU as the controller and the accelerometer sensor as the peripheral) was used to collect data from the sensor. The NodeMCU module handles the connection and transmission of data from the sensor to a database hosted on a Raspberry Pi 4. On the microcontroller side, pin D1 of the NodeMCU is connected to the serial data line (SDA) of the accelerometer, which is used for data transmission in inter-integrated circuit (I\({}^{2}\)C) communication. Similarly, pin D2 is connected to the serial clock line (SCL) of the LSM303D accelerometer, providing the clock signal required for data synchronization in I\({}^{2}\)C communication. The LSM303D sensor was selected for integration into the GaitBand device because of its high sensitivity in detecting small variations of acceleration and orientation, its low intrinsic noise level, and its suitability for continuous wearable fall detection. This sensor balances reliable data acquisition with low power consumption, which is essential for long-term monitoring scenarios. Its compatibility with standard I\({}^{2}\)C interfaces simplifies integration into the platform's edge-processing layer, supporting efficient timestamp synchronization and modular system updates. The 3.3 V output of the NodeMCU supplies power to the accelerometer via its Voltage Input (Vin) pin. Additionally, the ground (GND) pin of the NodeMCU is connected to the GND pin of the accelerometer to ensure a common voltage reference between the two devices. Figure 3: Interconnection of the components [6]. Figure 2: Components of GaitBand. The connection between the wireless module (acting as the controller) and the accelerometer sensor (acting as the peripheral) is summarized in Table 2.  
The wireless communication module connects upon startup to the Raspberry Pi gateway device and sends HTTP_POST messages, which include the data collected from the sensor to the database server. Once connected, the device starts transmitting the relevant data to the Raspberry Pi, which then forwards it to the ICIPRO Cloud database. The following advantages of GaitBand can be mentioned:  
* Relatively low design costs;
* Continuous data acquisition allows for highly accurate patient monitoring;
* The use of an accumulator enables continuous and proper functioning of the device, with the possibility of fully charging it during the patient's rest period.