I want to make a closed loop system using current sensor for a gripper. Since the gripper should neither hold so much force nor leave the object I need to use pid control. So I am looking for an arduino code by which from the analog input values of the current sensor to the arduino I can hold the angle for the servo. A particular value of current sensor is taken as set point. And if the current increases more than the set point the servo should move backwards and if the current value is less than the setpoint it should move forward. can u please help...