Please enclose your code in code tags </>
For a first test it's sufficient to supply a PWM signal, and the 12V of course.