Lego Technic Servo Motor - 9V PWM I want to control Lego Technic Servo Motor 88004.

The way it works is - Lego has a 4 cable connector. Two of them supply power (+9V &amp; GND) and the other are optionally +9V and they are called C1 and C2.

Servo turns right or left max 90 deg when you supply PWM to either C1 ("left") or C2 ("right"). (or the other way round, but it doesn't really matter)

That basically means that what I need is a 9V PWM and be able to supply it to either C1 or C2. What is more the frequency has to be 1150 Hz.

Now the question is how do I achieve this goal? 

I'm already using the L298N motor controller and happen to have one engine slot free. 

1) If I can supply PWM from Arduino to "LNA" input in L298N - will it also cause the output to be PWM? 
Because L298N has a transistor I have a feeling that the output is also going to be PWM unless there's something else there i.e. capacitor 

Even if it's not does that matter at all - meaning is it going to still work?

2) How do I produce PWM with 1150 Hz from Arduino? My Arduino is 16MHz so I suppose that it should be possible to switch output with order of magnitude smaller frequency.

If what I'm trying to do makes no sense please try to point me to the right direction.
Yes, the output will be a pwm. You can see it from the schematics.
you have few options, with different precision and complexity:


Configure one of the PWM HW blocks
Do it by sw in a loop
Use a timer to trigger a sw function - but it might be simpler to just configure the PWM HW block.
Use some existing library that will implement one of the methods I listed



I would recommend Option 1: it's not so difficult, you will learn something of the AVR internals and it will be the solution with the least overhead. You can have a look at this tutorial. There are also many others floating around.