Code to move the servo motor

I had difficulties to asses @hg1001's level of programming and understanding; so, I have just presented a solution, in line with his request of Post-1, which he could follow. However, codes for time delay using millis() function was totally inappropriate. As pointed out in Post-11, it could had been done by delay(1000) function.