Transistor current limiter, microcontroller controlled?
When you want a current limiter, David L. Jones provides and explaines one in his Lab Power Supply Design series. I will try to summarize his explanations (Video 1: starting at 19:45).



At \$V_{SET}\$ you provide a voltage between 0V - 1V to get the current drawn at OUT limited to 0A - 1A. Lets assume a voltage of 10V at OUT.

For 0V at \$V_{SET}\$ the voltage \$V_{Adder}\$ will be \$\frac{0 + 10}{2}V=5V\$. This is also the voltage at the non-inverting input of the opamp. The opamp tries to keep 5V at his  non-inverting input by driving the transistors. When you get 5V at the non-inverting input the voltage accross the 1R resistor is 0V, because you got 10V on his left and 10V on his right side. The current will be 0A.

The circuit is linear so you get a linear relationship between the voltage \$V_{SET}\$ and the limited current.

To control the limiting of the current by a microcontroller you could apply a filtered PWM signal to \$V_{SET}\$.