## 2 Materials and Methods
### Integration of the Sensing and Processing Sections into the Smart Garment  
The three used digital sensors (i.e., MAX30102, LM75A, and MMA8452Q) communicate via an I\({}^{2}\)C digital communication interface, which takes place on two lines: serial data (SDA) and serial clock (SCL). For the MMA8452Q accelerometer, a further connection line was added, which is the line for the interrupt signal set to detect freefall conditions. Furthermore, the electrochemical gas sensor modules were placed on the garment shoulders, making these the only sensors to protrude from the sweatshirt surface; the two developed modules provide four analog outputs, which are connected to analog inputs of the acquisition and conditioning board. Therefore, five connection lines were realized for the power supply and the three analog outputs of the conditioning module, including the two-terminal electrochemical gas sensors (i.e., ME2-CO, ME2-CH2O, and ME2-O2). Similarly, three connection lines were integrated for the power supply and the output signal of the conditioning module, integrating the ME3-H2S electrochemical sensor. The connections between the microcontroller board and sensors were directly sewn into the garment's fabric. Highly flexible and small-diameter stainless steel thread was used to sew the connections between the sensors and the microcontroller directly onto the fleece, as shown in Figure 5. In particular, the conductive thread is made of SUS316L steel, characterized by low resistance (i.e., 40 \(\Omega\)/m), good electrical conductivity, and extreme resistance to heat (up to 1300 \({}^{\circ}\)C) and corrosion, and it also provides an electromagnetic shield (model Electro-Fashion, manufactured by Kitronik Co., Nottingham, UK). Their characteristics and elongation capability make it ideal for developing wearable devices, preventing any impediments to user movements; indeed, it is featured by elongation at break of 37% [46] (Figure 5a, inset). Later, the electronic connections were insulated using a flexible silicone-based glue. Furthermore, as shown in Figure 6a, the connections were terminated on nickel-plated copper pressure clips. In this way, the board can be easily removed from the garment by releasing the clips and removing the sensors to allow safe washing. The developed garment is powered by a 380 mAh LiPo battery (model 702035, manufactured by Guangzhou Serui Battery Technology Co., Ltd., Guangzhou, China) characterized by 3.7 V nominal voltage, reaching 4.2 V in the fully charged condition. The sensors integrated into the developed smart garment are powered by a voltage of 3.3 V supplied by a voltage regulator (model XC6206332M, manufactured by Torex Semiconductor Ltd., Tokyo, Japan) integrated on the microcontroller board. Lastly, a plastic cover was fabricated by 3D printing to protect the MCU board (Figure 6b). Figure 5: Images of the garment interior: electrical connections sewn to the fabric using stainless steel thread (**a**) and the distribution of sensors and electronic modules (**b**). Figure 6: Details of the MCU board fixed on the garment by plastic support, with the connections terminated by clip button (**a**); plastic protective cover (**b**). The MAX30102 PPG sensor for HR and SpO\({}_{2}\) monitoring was fixed on the garment's right cuff, fixed by an elastic band to improve adhesion to the user's wrist, thus reducing measurement errors (Figure 7a). Specifically, a commercial MAX30102 breakout board was employed, which was suitably modified by removing the unnecessary 3.3 V DC/DC converter to reduce power consumption [47]. Additionally, the gas sensing modules were positioned on the garment's shoulders and connected to analog inputs of the MCU board; in particular, the H\({}_{2}\)S sensing module was installed on the right shoulder (Figure 7b), and the multisensor module was placed on the left shoulder (Figure 7c). Both modules were positioned inside pockets, so only the gas sensors are located outside the garment.