Skip to main content

Push-up (Approximate) Detection Training Game

A push-up training game based on distance sensors. It detects push-up actions using the QTZ distance sensor and combines automatic locks, electric shock, and vibrator devices for training incentives and punishment mechanisms.

A small stick can be added to the mouth ~ transforming it into a new gameplay = =

Purchase link: Taobao Purchase Link

Game Overview

Game Objectives

  • Complete a specified number of push-ups within the set time.
  • Maintain standard push-up posture.
  • Enhance training effectiveness and focus through device feedback.

Game Mechanics

  1. Game Start: The automatic lock device engages, starting the timer and action detection.
  2. Action Detection: The QTZ distance sensor monitors body height changes in real time.
  3. Completion Judgement: When the body lowers below a set distance, it's considered "down"; when it rises above a set distance, it's considered "up".
  4. Punishment Mechanism: Prolonged inactivity triggers electric shock punishments of random intensity and duration.
  5. Reward Interference: After consecutively completing a specified number, each subsequent completion has a probability to trigger vibrator interference.
  6. State Reset: The consecutively completed count resets to zero after a punishment, restarting the reward judgement.
  7. Game End: The game ends and the lock automatically releases when the target count is reached or the time expires.

Device Requirements

Device Configuration

Device TypeLogic IDDevice NameRequired?Function
QTZdistance_sensorQTZ Distance SensorYesDetects body height changes to judge push-up actions.
ZIDONGSUOauto_lockAutomatic LockNoLocks at game start, unlocks upon completion or timeout.
DIANJIshock_deviceElectric Shock DeviceNoExecutes punishment during prolonged inactivity.
TD01vibrator_deviceVibrator DeviceNoRandom interference after consecutively completing actions.

Game Parameter Configuration

Basic Parameters

Parameter NameTypeRangeDefault ValueDescription
durationNumber1-240 Minutes15 MinutesGame duration.
targetCountNumber1-2000 Counts30 CountsTarget number of push-ups to complete.
downThresholdNumber5-30 cm15 cmBody lowering below this distance is considered "down".
upThresholdNumber20-50 cm35 cmBody rising above this distance is considered "up".

Punishment Mechanism Parameters

Parameter NameTypeRangeDefault ValueDescription
idleTimeLimitNumber10-120 Seconds30 SecondsPunishment triggers if inactive beyond this time.
shockIntensityNumber10-100V15VBase value for electric shock intensity.
shockDurationNumber1-10 Seconds3 SecondsBase value for electric shock duration.
randomIntensityRangeNumber0-50V10VRandom electric shock intensity variation (± this value).
randomDurationRangeNumber0-5 Seconds1 SecondRandom duration variation (± this value).

Reward Interference Parameters

Parameter NameTypeRangeDefault ValueDescription
rewardTriggerCountNumber3-20 Counts5 CountsConsecutive completions required to start reward trigger judgement.
rewardTriggerProbabilityNumber0-100%30%Probability of interference triggering per completion after meeting the trigger condition.
vibratorIntensityNumber1-255100Vibrator intensity.
vibratorDurationNumber5-60 Seconds15 SecondsVibrator operation time.

Game Interface Explanation

Main Interface Elements

  • Remaining Time: Displays the remaining game time.
  • Completion Progress: Current completed count / target count.
  • Action Status: Shows the current action phase (down/up).
  • Lock Status: Shows the current status of the automatic lock.
  • Device Status: Shows the working status of each device.

Development Information

Version History

  • v1.0.0: Basic functionality implemented.