Variable PWM Output

Hello everyone! I'm new here and I'm looking for some help regarding my project. In a nutshell, I am building an bluetooth controlled quad copter (Ariel drone) and need some help with a pwm signal I need to output from the arduino. I am driving a flight control board that first takes in a pwm signal (from originally an RC transmitter) than converts these 4 channels into the logic needed to control each electronic speed control to power the motors. I have an RC transmitter that I was able to hook up to an oscilloscope to analyze the outputs. Basically, there is a neutral, full right, and full left position. Here is what I found the output was.

Left

Neutral

Right

So basically, you can see that at rest, the "on" time is ~ 1.5ms and the left and right "on" time is +- ~.5ms. From what I found, this is close to the industry RC standard.

I need some guidance on how I should go about programming this. My PS3 controller outputs a value from 0-255, 0 being full left, and 255 being full right. Basically, this 0-255 value needs to be interpreted into these desired waveforms. I have tried multiple different arduino library functions such as write microsecond, but I cant get reverse (left) with this! I need to be able to mimic these waveforms exactly in order to give my flight control board the proper signal.

Any help will be greatly appreciated!

Have you tried the Knob example that uses the Servo library? There is a function that allows you to convert one range of values based on the input data to a desired range of values to be outputted. This useful function is the map function, it will take your 0 - 255 from your PS3 controller and convert it to 0 - 180 degrees for the Servo library with relatively equal increments.

Please no cross posting!