Servo and PWM without library

The issue is that I don't know how to convert the angle into PWM

sp. "PPM".
The angle thing is just a convenience - servo travel varies form model to model, so you need to calibrate it yourself.
I'd modify the sketch to print the pulse length, add a pot to control the pulse length, and see what the angular travel is for a given rnage of pulse lengths.