Coding approach for controlling a bionic hand

Hi everyone,

I'm currently working on a bionic hand controlled by a MMA8452Q tri-axis tilt sensor module. I'm receiving reliable data from the sensor, and the arm's grip tightens when the motor turns clockwise and loosens when it turns anticlockwise. But I would like to control it in the following way:

  1. I want the grip to start tightening when the user raises their upper arm forward (+ve y), and it should keep tightening until they push their upper arm backward (-ve y).

  2. Similarly, when the user pushes their upper arm backward (-ve y), I want the grip to start loosening until they push their upper arm forward (+ve y) to stop it.

(For each action, there is a minimum amount that the arm must be moved before triggering).

Any ideas/general guidance on how to code these actions efficiently?

Thanks in advance.

Hard to say if you don't show us your current code...

I do not understand what kind of movement this is. What is "upper" arm?
from shoulder to ellbow?
If yes how does the shoulder-to-ellbow-part of an arm move forward without the rest???

left arm is "above" right arm = upper?

It would help a lot if you would draw some picture that show by picture what kind of movement this is.
or

if you post a sequence of measured sensor-values and how these sensor-values relate to the different movings

Shiva? :sunglasses:

image

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.