From transfer function to arduino
Let's assume you have an Arduino that you have arranged to sample a signal with a sample rate of 1/T that is then processed by your controller. Let's also assume that the processing time for your controller is small compared to T e.g. 0.1/T

Firstly, you need to convert the controller transfer function to discrete time. There are lots of ways to do this. Matlab has a convenient c2d() function. One way you can do it on paper (not the best way), is to use Euler's Method.

s=(z-1)/T   where T is the sampling period.

Converting a transfer function then: (s+a)/(s+b) => (z-(1-aT))/(z-(1-bT))

So now you have a TF in z such as : Y(z)/X(z)=(z-c)/(z-d)  where Y is the output and X is the input.

To implement this in a controller you need this as a difference equation in terms of delays. So convert the equation to a function of (z^-1) which is a delay:

Y(z)/X(z) = (1-cz^-1)/(1-dz^-1)

and re-write as:
Y(Z)(1-dz^-1) = X(z)(1-cz^-1)

Y(Z)-d.Y(z).z^-1 = X(z)-c.X(z).z^-1

and change to sample time treating z^-1 as a delay:
y(n) - d.y(n-1) = x(n) - c.x(n-1)

rearranging:
y(n) = d.y(n-1) + x(n) - c.x(n-1)

You can implement this easily in the Arduino by realising that y(n-1) is the previous value of y(n) and similarly for x(n), and x(n) is the value input to the controller; i.e. the reference minus the output from the ADC.