if ((MAV1 < Thre1) and (MAV2 < Thre2)) then
 Mode 0; (applying zero forces)
else if (MAV1 >= Thre1) then
 Mode 1; (opening the fingertips)
else then
 Mode 2; (closing the fingertips)
Algorithm 1