# Development of a Virtual Reality-Based Environment for Telerehabilitation
## 2 Materials and Methods
### The Main User Console
#### 2.2.2 Software Application Development
Once the connection is established, the button's background turns red, and the text changes to \"Disconnect\" (Figure 8 (1)). * Data transfer between the user interface and the VR application begins only after the \"Start\" button is pressed, at which point the button's background color turns from blue to red, and the text changes from \"Start\" to \"Stop\" (Figure 8 (1)). * To command the parallel robot to perform different types of rehabilitation exercises, the following commands are used: The parallel robotic system allows the performance of 5 types of rehabilitation exercises (HipAbduction, Dorsiflexion, Inversion, HipFlexion, KneeFlexion). For each exercise, the therapist can set parameters such as amplitude, speed, and number of repetitions. After configuring the necessary settings, the therapist selects the desired type of exercise by pressing the corresponding button (Figure 8 (2)). Once the desired exercise button is pressed, it is added to a list (Figure 8 (3)) along with the order of the exercise,  
Figure 8: User interface: Exercises. the execution amplitude, the speed, and the number of repetitions. After selecting and adding the rehabilitation exercises to the list, the therapist can save them for future use or load them into the list (Figure 8 (4)). * To initiate the rehabilitation exercises, the therapist must press the \"Start exercises\" button (Figure 8 (5)). At this point, the robotic rehabilitation structure begins performing the selected rehabilitation exercises for the patient, and the elapsed time for each individual exercise is also displayed. * An EMG (electromyography) sensor is used during patient monitoring to track muscle activity in rehabilitation exercises. This sensor measures the electrical signals (Figure 8 (6)) generated by muscles when they are activated. Increased muscle activity can indicate improvements in muscle strength and function. * The therapist can demonstrate to the patient the types of exercises that the parallel robotic rehabilitation system can perform using two controllers (Figure 8 (7)). * To close the user interface, the \"Exit\" button (Figure 8 (8)) must be pressed. **Video monitoring & Robot control** menu (Figure 9), where the therapist can control the experimental robot and monitor the patient while the robotic system performs various lower limb recovery exercises. The interface includes the following commands:  
* **Connect** button--establishes a connection between the C# application and the control computer of the experimental rehabilitation robot. * **Homing** button--initializes the servomotors on the experimental robotic structure when pressed. * **Start** button--by pressing this button, the experimental robotic system will start performing the rehabilitation exercises. * **Emergency STOP--an emergency button that cuts the power supply to the experimental robotic system. **Session history** menu (Figure 10), which enables the therapist to analyze the patient's progress over time by accessing recorded data from each exercise session. The interface includes the following features:  
* When pressing the \"Display values\" button (Figure 10 (1)), the recorded data for the rehabilitation exercises (Figure 10 (2)) and the data from the EMG sensor (Figure 10 (3)) for each session are displayed. * To delete the session data from the file, the \"Delete values\" button (Figure 10 (4)) must be pressed. To perform a detailed analysis of the patient's overall condition after using the robotic rehabilitation system, the therapist uses the second menu of the user interface (Figure 10). This menu provides essential information for assessing the patient's progress. It enables monitoring of the patient's muscle activity, capturing data on muscle tone, activation level, and any variations observed during rehabilitation sessions. Additionally, the menu tracks the number of completed rehabilitation exercise sessions, which is crucial for assessing training consistency and frequency, while also promoting adherence to the rehabilitation plan.