Skip to main content
. 2021 Oct 8;21(19):6692. doi: 10.3390/s21196692
Algorithm 1 Pseudo code of the Proposed System
Input: Gyroscope Sensor and Electromyography sensor
Output: Recommendation on text view, Recommendation by text-to-speech feature
 1: Initialize sensor value equals to zero
 2: if  Checksensorvalue>0  then
 3:  Input passed to Real-Time Database
 4: end if
 5: repeat
 6:  Android receive input from Real-Time Database
 7:  Data passed to AI Platform through cloud functions
 8:  Classification Algorithm = KNN
 9:  Prediction forwarded to Android through cloud functions
 10:  if  prediction==2  then
 11:   Perfect || Keep going
 12:  else if  prediction==3  then
 13:   Please straighten your lower back and chest up || You must rest
 14:  else if  prediction==4  then
 15:   Please bend a little
 16:  else
 17:   Junk values
 18:  end if
 19: until exercise  ||  (timer>0)