4. How to use (API Documentation) - GachonCapstoneHCI/pingpong_score GitHub Wiki

Swing Recognition

setSwingRecognitionThreshold(int threshold)

  • Parameter : int new threshold for swing recognition
  • Return : NONE

getSwingRecognitionThreshold()

  • Parameter : NONE
  • Return : int new threshold for swing recognition

Ball Sound Detection

setBallSoundDetectionThreshold(int startThreshold, int endThreshold)

  • Parameter : int new start threshold and end threshold for ball sound detection
  • Return : NONE

getBallSoundDetectionThreshold()

  • Parameter : NONE
  • Return : int[] current threshold for ball sound detection // value[0] is startThreshold and value[1] is endThreshold

Scoring Algorithm

int getCurrentScore(int player)

  • Parameter : int 0 (me) or 1 (another player)
  • Return : int currentScore

setTimeoutTimer(int ms)

  • Parameter : timer millisecond
  • Return : NONE