Closed loop bi-directional torque control of DC motor!?!

Thanks for the reply.
Well, for PMDC motors the torque is proportional to current - the motorboard i have has an analog current sensor that provides a voltage to the Arduino. You can monitor this with the Arduino to give torque feedback as torque is equal to T=Kt*I, where T is torque, Kt is the motor torque constant, and I is the current. I need a linearly increasing output torque with respect to my input signal - i am "just" having a hard time writing the code.

As i said i am completely new to both Arduino and quite new to programming in general. I am studying ME so hopefully i will be able to get my head around it with a little help.