BPI SoftPWM for a fan

[Interfacing]
BPI SoftPWM for a fan

Hi everyone,
I have a BPI set up for media streaming etc. Now I want to cool the Pi with an external powered fan with softpwm. The PWM-Cable of the fan is attached to GPIO 0 (Phys. Pin11). Unfortunately, I have no expiriences with python or C/C++. Is there a script available for softpwm for a fan?
The fan is called Arctic Cooling AF
Max RPM 1500
12V

Based on the idea outlined in this post http://www.lemaker.org/forum.php?mod=viewthread&tid=11167 (defining a PWM pin and setting a value between 1 and 100) I wrote a script a few hours ago that uses a simple formula to derive the PWM value from the thermal value of the PMU (more realiable than the SoC's temperature):

The outcommented line "AdjustedTemp=$(( 101 - ${AdjustedTemp} ))" would invert the value. Now when temperature is below 40°C then duty_percent will be set to 1 and if temperature rises also this value will be increased. If you uncomment this line it would work the other way around: Setting duty_percent to 100 when 40°C or colder and decreasing it constantly when the temperature rises towards 55°C.

And maybe there's a mistake since values of 0 should also be possible to completely shut the fan off (easy to fix: just replace 1 with 0 two times and change 101 to 100)