Senior design controls project

Hey all, I am working on a project that spots a user during a squat or bench press. The problem I am facing is how to program the system to recognize the user is struggling, so it can call a basic function I have written. The basic concept of the project involves two arduinos communicating wirelessly through xbee modules. An IR sensor connected to the first Arduino/xbee and is mounted to the weight bar where it detects user input with respect to the ground (ie, changes in height). When the IR sensor reads a constant value (no change in height), the user is "struggling". How can I program it to recognize when the user is struggling? I have set up the xbees and motor control hardware successfully, so I dont need any help there. I am using height = sharp.distance() in conjunction with the sharp.IR library. Thank you for any advice

HadenWill: The problem I am facing is how to program the system to recognize the user is struggling,

That's easy - have it listen and trigger when he screams for help. :D

Use an accelerometer to measure the time taken from up to down and return. As the struggle increases, the time will increase. Set an alarm at the required time.

Weedpharma

weedpharma:
Use an accelerometer to measure the time taken from up to down and return. As the struggle increases, the time will increase. Set an alarm at the required time.

Weedpharma

Using an accelerometer and the general method of slow movement or lack of movement might trigger before it’s needed. A voice recognition module might be more reliable from that point of view, if a microphone could be placed in an appropriate position.