2.2.2. Software

A gait monitoring application was designed based on C# language. It visualizes the plantar pressure changes in real time by using capacitance values from the insole sensor. The unit of pressure in our sensing system is capacitance itself, that is, the difference value between pre-pressure (baseline; no pressure applied) and post-pressure at the time of a heel strike (HS) and toe-off (TO). The visualization was to provide feedback on plantar pressure distribution during walking. The software saves the data and exports them in a text file or an excel file. All data are stored as an integer and the software checks in real time whether the data are being received from all 20 channels, 10 channels from each foot.

Figure 5 below is showing the gait data of a left hemiparetic male patient. The graph on top presents the real time gait signals, which are based on the capacitance values received from the left foot (insole), and the graph on the bottom visualizes the data from the right foot. Each of the high peaks at the time of the heel strike and toe-off are marked and the average values of the peaks are shown in a dotted line.

(**a**) **Figure 4.** *Cont*.

**Figure 4.** The structure of the printed circuit board (PCB) board, (**a**) PCB configuration, (**b**) STM32F103 MCU, (**c**) MPR121QR2 capacitance to digital converter, (**d**) HM-13 Bluetooth module schematic diagram.


The PPD was calculated by using Equation (2) as expressed below [17].

$$\text{Percentage of plantar pressure difference } \left( \% \right) = \frac{2 \left| \text{Pressure}\_{Left} - \text{Pressure}\_{Right} \right|}{\text{Pressure}\_{Left} + \text{Pressure}\_{Right}} \times 100 \tag{2}$$

where, *PressureLe f t* and *PressureRight* refers to the summed pressure data on each foot as shown in Figure 6.

**Figure 6.** The percentage of plantar pressure difference calculation method diagram.
