Servo motor

Hello,

I need to make a light sensor with a ldr and solar panel for my school.
Then I need to connect a servo motor (without library) wich points the values of the ldr or solar panel.
The values need to be printed on a LCD.

My question is: how do you program a servo without library?

thank you

Step 1: Read up on how a servo is controlled.
Step 2: Implement that behaviour in your code

Google has plenty of answers for you.... here is one to understand Servos

cf the part on "How is the servo controlled?"

The servo motor expects to see a pulse every 20 milliseconds (ms) and the length of the pulse will determine how far the motor turns. For example, a 1.5ms pulse will make the motor turn to the 90° position. Shorter than 1.5ms moves it in the counter clockwise direction toward the 0° position, and any longer than 1.5ms will turn the servo in a clockwise direction toward the 180° position

Firstly, you SHOULD know how to control servo motor, See how servo motor works

Secondly, you can find the source code of servo library, read the source code.

Thirdly, implement code by yourself.