# Design of Exergaming Platform for Upper Limb Rehabilitation Using Surface Electromyography
## 2 Materials and Methods
### Conceptual Design  
The design of the exergaming solution was based on the above analysis. At the heart of the system is the concept of pairing healthcare professionals with patients, enabling a dynamic interaction where the former adjusts game settings based on the latter's performance, which, in turn, generates valuable health data. A key feature of the system is its flexibility; it supports the reassignment of patient-professional pairs, ensuring that patient care is continuous and informed, even when a patient changes professional. This is achieved through a web application that allows healthcare professionals to monitor their patients' progress, with the data being securely stored and managed in a database.  
Once the web application concept was solidified, integrating the game directly into it emerged as a strategic move, enhancing accessibility and simplifying maintenance. This approach allowed users to access the game on any device with a web browser, with no need for installation. It also streamlined the process for rolling out updates and introduced the possibility of adding social gaming features, enriching the user experience by fostering a community among players. As a result, the overall architecture of the system includes two types of users--practitioners and players--with different interfaces for each of them. Practitioners have access to a dashboard, while players engage with a personalized gaming experience that is implicitly tailored to their health needs through that dashboard.  
Finally, for the motion sensing input device, the Myo armband [33; 34] was chosen for its effective surface electromyography (sEMG) sensors that capture muscle activity, its inertial sensors for precise motion tracking, and its user-friendly design. The armband is attached directly to the forearm without electrodes or sticky substances; it is lightweight and offers an adjustable diameter for comfort, making it ideal for continuous health monitoring.  
The efficient recognition of a variety of hand movements, especially when constrained by real-time requirements, is a topic of significant interest for many researchers, including our team. This process is fundamental to all applications targeting touchless input, such as our exergame, and typically employs artificial intelligence (AI) techniques. The work presented in [35] explores this topic using a Temporal Convolutional Network (TCN) model applied to entire sequences of sEMG signals to recognize 52 hand gestures. The performance of the model is further evaluated through a real-time simulation, where samples of each signal sequence are progressively fed into the system. Our current efforts include developing deep learning algorithms for hand movement recognition, similar to this approach.  
However, in this study, we leverage the capability of the Myo armband to detect five distinct poses through pose start and pose end events, a feature not found in comparable devices. This allows us to prioritize the development of the initial pilot application before integrating a customized recognition scheme. To facilitate future integration, we optimized the system infrastructure by developing an additional compact application running on the user's device. This intermediary application can receive sEMG data, process the data through a neural network model trained to recognize complex gestures, and transmit the gestural data to the web-based game. This approach enhances the capabilities of the system without interfering with the current gaming experience, as it is configured to use the Myo armband events when no model is specified while visualizing the stream of sEMG data on screen.